[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix some "ISO C90 forbids mixed declarations and code" warnings



commit 5c9008e0b077e79297a5245573675d95a1f266cc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Sep 3 13:39:31 2013 -0400

    Fix some "ISO C90 forbids mixed declarations and code" warnings
---
 src/or/directory.c  |    2 +-
 src/test/test_dir.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index 099df50..815e0ab 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -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;
     }
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 0292cbd..94d1284 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -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 */

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits