Ver código fonte

Appease verbose GCC warnings.

svn:r4466
Nick Mathewson 20 anos atrás
pai
commit
5eef9177c5
2 arquivos alterados com 3 adições e 2 exclusões
  1. 2 1
      src/or/control.c
  2. 1 1
      src/or/main.c

+ 2 - 1
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";

+ 1 - 1
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) {