projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable and fix many extra warnings supported by GCC and Clang.
[tinc]
/
src
/
process.c
diff --git
a/src/process.c
b/src/process.c
index
b6d4e12
..
7d528f7
100644
(file)
--- a/
src/process.c
+++ b/
src/process.c
@@
-20,25
+20,17
@@
#include "system.h"
#include "system.h"
-#include "conf.h"
-#include "connection.h"
-#include "control.h"
-#include "device.h"
-#include "edge.h"
-#include "event.h"
#include "logger.h"
#include "names.h"
#include "logger.h"
#include "names.h"
-#include "net.h"
-#include "node.h"
#include "process.h"
#include "process.h"
-#include "subnet.h"
-#include "utils.h"
-#include "xalloc.h"
#include "version.h"
#include "version.h"
+#ifdef HAVE_MINGW
+#include "utils.h"
+#endif
+
/* If zero, don't detach from the terminal. */
bool do_detach = true;
/* If zero, don't detach from the terminal. */
bool do_detach = true;
-bool sigalrm = false;
extern char **g_argv;
extern bool use_logfile;
extern char **g_argv;
extern bool use_logfile;
@@
-54,7
+46,8
@@
static SERVICE_STATUS_HANDLE statushandle = 0;
static bool install_service(void) {
char command[4096] = "\"";
static bool install_service(void) {
char command[4096] = "\"";
- SERVICE_DESCRIPTION description = {"Virtual Private Network daemon"};
+ char description_buffer[] = "Virtual Private Network daemon";
+ SERVICE_DESCRIPTION description = {description_buffer};
manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS);
@@
-115,7
+108,7
@@
static bool install_service(void) {
io_t stop_io;
io_t stop_io;
-DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID data, LPVOID context) {
+
static
DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID data, LPVOID context) {
(void)type;
(void)data;
(void)context;
(void)type;
(void)data;
(void)context;
@@
-149,7
+142,7
@@
DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID data, LPVOID conte
return NO_ERROR;
}
return NO_ERROR;
}
-VOID WINAPI run_service(DWORD argc, LPTSTR *argv) {
+
static
VOID WINAPI run_service(DWORD argc, LPTSTR *argv) {
extern int main2(int argc, char **argv);
status.dwServiceType = SERVICE_WIN32;
extern int main2(int argc, char **argv);
status.dwServiceType = SERVICE_WIN32;