diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-02-28 20:24:27 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-02-28 20:24:27 +0000 |
commit | f38240435a474b71a308cecf2e4e5aff6a40d332 (patch) | |
tree | 489bc14fcc9fd343bfc27e0bcf402da0582b960f /src/or | |
parent | 3008c3b768f2cb8ab735e8ebbda2d4322910b19e (diff) | |
download | tor-f38240435a474b71a308cecf2e4e5aff6a40d332.tar.gz tor-f38240435a474b71a308cecf2e4e5aff6a40d332.zip |
r12001@catbus: nickm | 2007-02-28 15:24:12 -0500
Try to build without warnings on mingw with verbose warnings on. First attempt.
svn:r9688
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/eventdns.c | 3 | ||||
-rw-r--r-- | src/or/main.c | 23 |
2 files changed, 23 insertions, 3 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 7270df5052..517db58853 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -714,7 +714,7 @@ reply_handle(struct request *const req, u16 flags, u32 ttl, struct reply *reply) /*XXXX refactor the parts of */ log(EVDNS_LOG_DEBUG, "Got a SERVERFAILED from nameserver %s; " "will allow the request to time out.", - debug_nota(req->ns->address)); + debug_ntoa(req->ns->address)); break; default: // we got a good reply from the nameserver @@ -2559,6 +2559,7 @@ evdns_resolv_set_defaults(int flags) { #ifndef HAVE_STRTOK_R static char * strtok_r(char *s, const char *delim, char **state) { + (void)state; return strtok(s, delim); } #endif diff --git a/src/or/main.c b/src/or/main.c index 19e875c2c0..b030fe2eb9 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1576,6 +1576,8 @@ handle_signals(int is_parent) sigaction(SIGXFSZ, &action, NULL); #endif } +#else /* MS windows */ + (void)is_parent; #endif /* signal stuff */ } @@ -1739,6 +1741,20 @@ do_hash_password(void) #ifdef MS_WINDOWS_SERVICE +/* XXXX can some/all these functions become static? without breaing NT + * services? */ +void nt_service_control(DWORD request); +void nt_service_body(int argc, char **argv); +void nt_service_main(void); +SC_HANDLE nt_service_open_scm(void); +SC_HANDLE nt_service_open(SC_HANDLE hSCManager); +int nt_service_start(SC_HANDLE hService); +int nt_service_stop(SC_HANDLE hService); +int nt_service_install(int argc, char **argv); +int nt_service_remove(void); +int nt_service_cmd_start(void); +int nt_service_cmd_stop(void); + struct service_fns { int loaded; @@ -1917,6 +1933,8 @@ void nt_service_body(int argc, char **argv) { int r; + (void) argc; /* unused */ + (void) argv; /* unused */ nt_service_loadlibrary(); service_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS; service_status.dwCurrentState = SERVICE_START_PENDING; @@ -1962,7 +1980,7 @@ nt_service_main(void) DWORD result = 0; char *errmsg; nt_service_loadlibrary(); - table[0].lpServiceName = GENSRV_SERVICENAME; + table[0].lpServiceName = (char*)GENSRV_SERVICENAME; table[0].lpServiceProc = (LPSERVICE_MAIN_FUNCTION)nt_service_body; table[1].lpServiceName = NULL; table[1].lpServiceProc = NULL; @@ -1988,6 +2006,7 @@ nt_service_main(void) case CMD_VERIFY_CONFIG: printf("Configuration was valid\n"); break; + case CMD_RUN_UNITTESTS: default: log_err(LD_CONFIG, "Illegal command number %d: internal error.", get_options()->command); @@ -2285,7 +2304,7 @@ nt_service_install(int argc, char **argv) printf("Done with CreateService.\n"); /* Set the service's description */ - sdBuff.lpDescription = GENSRV_DESCRIPTION; + sdBuff.lpDescription = (char*)GENSRV_DESCRIPTION; service_fns.ChangeServiceConfig2A_fn(hService, SERVICE_CONFIG_DESCRIPTION, &sdBuff); printf("Service installed successfully\n"); |