summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-09-17 11:56:34 +0200
committerGravatar Nikias Bassen2013-09-17 11:56:34 +0200
commit9b525ba69fff75f3a1cbc755b8da285d1f7286cf (patch)
tree83c5cb28ed260dcc926cdb5561240aef33d8f394 /src/main.c
parentf4758e8b15cd30fe3f7f18de42e2ea20bc5696f0 (diff)
downloadusbmuxd-9b525ba69fff75f3a1cbc755b8da285d1f7286cf.tar.gz
usbmuxd-9b525ba69fff75f3a1cbc755b8da285d1f7286cf.tar.bz2
silence several compiler warnings
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index de5e5cc..32c6a2b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -64,7 +64,7 @@ static int daemon_pipe;
64 64
65static int report_to_parent = 0; 65static int report_to_parent = 0;
66 66
67int create_socket(void) { 67static int create_socket(void) {
68 struct sockaddr_un bind_addr; 68 struct sockaddr_un bind_addr;
69 int listenfd; 69 int listenfd;
70 70
@@ -98,7 +98,7 @@ int create_socket(void) {
98 return listenfd; 98 return listenfd;
99} 99}
100 100
101void handle_signal(int sig) 101static void handle_signal(int sig)
102{ 102{
103 if (sig != SIGUSR1 && sig != SIGUSR2) { 103 if (sig != SIGUSR1 && sig != SIGUSR2) {
104 usbmuxd_log(LL_NOTICE,"Caught signal %d, exiting", sig); 104 usbmuxd_log(LL_NOTICE,"Caught signal %d, exiting", sig);
@@ -124,7 +124,7 @@ void handle_signal(int sig)
124 } 124 }
125} 125}
126 126
127void set_signal_handlers(void) 127static void set_signal_handlers(void)
128{ 128{
129 struct sigaction sa; 129 struct sigaction sa;
130 sigset_t set; 130 sigset_t set;
@@ -162,7 +162,7 @@ static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout
162} 162}
163#endif 163#endif
164 164
165int main_loop(int listenfd) 165static int main_loop(int listenfd)
166{ 166{
167 int to, cnt, i, dto; 167 int to, cnt, i, dto;
168 struct fdlist pollfds; 168 struct fdlist pollfds;
@@ -519,7 +519,7 @@ int main(int argc, char *argv[])
519 goto terminate; 519 goto terminate;
520 } 520 }
521 sprintf(pids, "%d", getpid()); 521 sprintf(pids, "%d", getpid());
522 if ((res = write(lfd, pids, strlen(pids))) != strlen(pids)) { 522 if ((size_t)(res = write(lfd, pids, strlen(pids))) != strlen(pids)) {
523 usbmuxd_log(LL_FATAL, "Could not write pidfile!"); 523 usbmuxd_log(LL_FATAL, "Could not write pidfile!");
524 if(res >= 0) 524 if(res >= 0)
525 res = -2; 525 res = -2;