]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix some "ISO C90 forbids mixed declarations and code" warnings
authorNick Mathewson <nickm@torproject.org>
Tue, 3 Sep 2013 17:39:31 +0000 (13:39 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 3 Sep 2013 17:39:31 +0000 (13:39 -0400)
src/or/directory.c
src/test/test_dir.c

index 099df50d07c7cee5b41c1ed75bf4d538369afbe3..815e0abffd7a79842d250a833ab01482c9223e3d 100644 (file)
@@ -1418,10 +1418,10 @@ parse_http_url(const char *headers, char **url)
 
   /* Check if the header is well formed (next sequence
    * should be HTTP/1.X\r\n). Assumes we're supporting 1.0? */
-  char *e = (char *)eat_whitespace_no_nl(s);
   {
     unsigned minor_ver;
     char ch;
+    char *e = (char *)eat_whitespace_no_nl(s);
     if (2 != tor_sscanf(e, "HTTP/1.%u%c", &minor_ver, &ch)) {
       return -1;
     }
index 0292cbd667893ae535b9b51fe6165c814bc88236..94d1284f86a635460b25d17b6bfbcb3fed642cad 100644 (file)
@@ -2367,8 +2367,8 @@ test_dir_fmt_control_ns(void *arg)
 static void
 test_dir_http_handling(void *args)
 {
-  (void)args;
   char *url = NULL;
+  (void)args;
 
   /* Parse http url tests: */
   /* Good headers */