[or-cvs] Compile without warnings on windows
Nick Mathewson
nickm at seul.org
Thu Oct 14 04:06:26 UTC 2004
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv10086/src/or
Modified Files:
main.c router.c routerlist.c routerparse.c
Log Message:
Compile without warnings on windows
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -d -r1.333 -r1.334
--- main.c 14 Oct 2004 03:18:14 -0000 1.333
+++ main.c 14 Oct 2004 04:06:24 -0000 1.334
@@ -815,7 +815,7 @@
#ifdef MS_WINDOWS_SERVICE /* Do service stuff only on windows. */
if (service_status.dwCurrentState != SERVICE_RUNNING) {
return 0;
- }
+ }
#endif
#ifndef MS_WINDOWS /* do signal stuff only on unix */
if(please_shutdown) {
Index: router.c
===================================================================
RCS file: /home/or/cvsroot/src/or/router.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- router.c 14 Oct 2004 03:44:45 -0000 1.96
+++ router.c 14 Oct 2004 04:06:24 -0000 1.97
@@ -349,7 +349,7 @@
/* 6b. [authdirserver only] add own key to approved directories. */
crypto_pk_get_digest(get_identity_key(), digest);
if (!router_digest_is_trusted_dir(digest)) {
- add_trusted_dir_server(options.Address, options.DirPort, digest);
+ add_trusted_dir_server(options.Address, (uint16_t)options.DirPort, digest);
}
/* 7. [authdirserver only] load old directory, if it's there */
sprintf(keydir,"%s/cached-directory", datadir);
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- routerlist.c 14 Oct 2004 03:44:45 -0000 1.156
+++ routerlist.c 14 Oct 2004 04:06:24 -0000 1.157
@@ -54,7 +54,7 @@
snprintf(filename,sizeof(filename),"%s/cached-directory", get_data_directory(&options));
s = read_file_to_str(filename,0);
if (s) {
- tor_strstrip(s,"\r"); /* XXXX This is a bug workaround for win32. */
+ tor_strstrip(s,"\r"); /* XXXX This is a bug workaround for win32. */
log_fn(LOG_INFO, "Loading cached directory from %s", filename);
if (router_load_routerlist_from_directory(s, NULL, 0) < 0) {
log_fn(LOG_WARN, "Cached directory '%s' was unparseable; ignoring.", filename);
Index: routerparse.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerparse.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- routerparse.c 14 Oct 2004 02:48:28 -0000 1.54
+++ routerparse.c 14 Oct 2004 04:06:24 -0000 1.55
@@ -799,9 +799,9 @@
log_fn(LOG_WARN,"Wrong # of arguments to \"ports\"");
goto err;
}
- router->or_port = tor_parse_long(tok->args[0],10,0,65535,NULL,NULL);
- router->socks_port = tor_parse_long(tok->args[1],10,0,65535,NULL,NULL);
- router->dir_port = tor_parse_long(tok->args[2],10,0,65535,NULL,NULL);
+ router->or_port = (uint16_t) tor_parse_long(tok->args[0],10,0,65535,NULL,NULL);
+ router->socks_port = (uint16_t) tor_parse_long(tok->args[1],10,0,65535,NULL,NULL);
+ router->dir_port = (uint16_t) tor_parse_long(tok->args[2],10,0,65535,NULL,NULL);
ports_set = 1;
}
@@ -813,7 +813,7 @@
log_fn(LOG_WARN,"Wrong # of arguments to \"dircacheport\"");
goto err;
}
- router->dir_port = tor_parse_long(tok->args[0],10,1,65535,NULL,NULL);
+ router->dir_port = (uint16_t) tor_parse_long(tok->args[0],10,1,65535,NULL,NULL);
}
tok = find_first_by_keyword(tokens, K_BANDWIDTH);
More information about the tor-commits
mailing list