[or-cvs] Use a stricter set of warnings; make them all pass.

Nick Mathewson nickm at seul.org
Tue Nov 2 03:02:19 UTC 2004


Update of /home/or/cvsroot/src/tools
In directory moria.mit.edu:/tmp/cvs-serv3912/src/tools

Modified Files:
	tor-resolve.c 
Log Message:
Use a stricter set of warnings; make them all pass.

Index: tor-resolve.c
===================================================================
RCS file: /home/or/cvsroot/src/tools/tor-resolve.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- tor-resolve.c	1 Nov 2004 20:41:47 -0000	1.2
+++ tor-resolve.c	2 Nov 2004 03:02:17 -0000	1.3
@@ -44,9 +44,10 @@
   do { log_fn(LOG_ERR, "Error while %s: %s", act,           \
               tor_socket_strerror(tor_socket_errno(_s))); } while(0)
 
-int build_socks4a_resolve_request(char **out,
-                                  const char *username,
-                                  const char *hostname)
+static int 
+build_socks4a_resolve_request(char **out,
+			      const char *username,
+			      const char *hostname)
 {
   size_t len;
   tor_assert(out);
@@ -65,8 +66,9 @@
   return len;
 }
 
-int parse_socks4a_resolve_response(const char *response, size_t len,
-                                   uint32_t *addr_out)
+static int 
+parse_socks4a_resolve_response(const char *response, size_t len,
+			       uint32_t *addr_out)
 {
   uint8_t status;
   tor_assert(response);
@@ -86,8 +88,9 @@
   return 0;
 }
 
-int do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
-               uint32_t *result_addr)
+static int 
+do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
+	   uint32_t *result_addr)
 {
   int s;
   struct sockaddr_in socksaddr;
@@ -149,7 +152,8 @@
   return 0;
 }
 
-void usage(void)
+static void 
+usage(void)
 {
   puts("Syntax: tor-resolve [-v] hostname [sockshost:socksport]");
   exit(1);



More information about the tor-commits mailing list