Compile without warnings on windows

svn:r2491
This commit is contained in:
Nick Mathewson 2004-10-14 04:06:24 +00:00
parent bd10bf4b5b
commit 08c33f0b46
2 changed files with 5 additions and 5 deletions

View File

@ -349,7 +349,7 @@ int init_keys(void) {
/* 6b. [authdirserver only] add own key to approved directories. */ /* 6b. [authdirserver only] add own key to approved directories. */
crypto_pk_get_digest(get_identity_key(), digest); crypto_pk_get_digest(get_identity_key(), digest);
if (!router_digest_is_trusted_dir(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 */ /* 7. [authdirserver only] load old directory, if it's there */
sprintf(keydir,"%s/cached-directory", datadir); sprintf(keydir,"%s/cached-directory", datadir);

View File

@ -799,9 +799,9 @@ routerinfo_t *router_parse_entry_from_string(const char *s,
log_fn(LOG_WARN,"Wrong # of arguments to \"ports\""); log_fn(LOG_WARN,"Wrong # of arguments to \"ports\"");
goto err; goto err;
} }
router->or_port = tor_parse_long(tok->args[0],10,0,65535,NULL,NULL); router->or_port = (uint16_t) 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->socks_port = (uint16_t) 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->dir_port = (uint16_t) tor_parse_long(tok->args[2],10,0,65535,NULL,NULL);
ports_set = 1; ports_set = 1;
} }
@ -813,7 +813,7 @@ routerinfo_t *router_parse_entry_from_string(const char *s,
log_fn(LOG_WARN,"Wrong # of arguments to \"dircacheport\""); log_fn(LOG_WARN,"Wrong # of arguments to \"dircacheport\"");
goto err; 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); tok = find_first_by_keyword(tokens, K_BANDWIDTH);