aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-06-20 09:38:29 +0000
committerNick Mathewson <nickm@torproject.org>2005-06-20 09:38:29 +0000
commit5eef9177c57ccac03b6676e039c56bf7a6705198 (patch)
tree228df3a01f3e7c866863307192243fcb020a8bba
parente1e246fa78c890f1c963380b5240d7c2883134d4 (diff)
downloadtor-5eef9177c57ccac03b6676e039c56bf7a6705198.tar
tor-5eef9177c57ccac03b6676e039c56bf7a6705198.tar.gz
Appease verbose GCC warnings.
svn:r4466
-rw-r--r--src/or/control.c3
-rw-r--r--src/or/main.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 969dd4799..582f6e001 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1543,6 +1543,8 @@ handle_control_postdescriptor(connection_t *conn, uint32_t len,
{
char *desc;
int v0 = STATE_IS_V0(conn->state);
+ const char *msg=NULL;
+
if (v0)
desc = (char*)body;
else {
@@ -1551,7 +1553,6 @@ handle_control_postdescriptor(connection_t *conn, uint32_t len,
read_escaped_data(cp, len-(cp-body), 1, &desc);
}
- const char *msg=NULL;
switch (router_load_single_router(desc, &msg)) {
case -1:
if (!msg) msg = "Could not parse descriptor";
diff --git a/src/or/main.c b/src/or/main.c
index 4f11e8a5c..e3649501f 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -893,7 +893,7 @@ second_elapsed_callback(int fd, short event, void *args)
/** Called when a possibly ignorable libevent error occurs; ensures that we
* don't get into an infinite loop by ignoring too many errors from
* libevent. */
-int
+static int
got_libevent_error(void)
{
if (++n_libevent_errors > 8) {