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;
static int report_to_parent = 0;
-int create_socket(void) {
+static int create_socket(void) {
struct sockaddr_un bind_addr;
int listenfd;
@@ -98,7 +98,7 @@ int create_socket(void) {
return listenfd;
}
-void handle_signal(int sig)
+static void handle_signal(int sig)
{
if (sig != SIGUSR1 && sig != SIGUSR2) {
usbmuxd_log(LL_NOTICE,"Caught signal %d, exiting", sig);
@@ -124,7 +124,7 @@ void handle_signal(int sig)
}
}
-void set_signal_handlers(void)
+static void set_signal_handlers(void)
{
struct sigaction sa;
sigset_t set;
@@ -162,7 +162,7 @@ static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout
}
#endif
-int main_loop(int listenfd)
+static int main_loop(int listenfd)
{
int to, cnt, i, dto;
struct fdlist pollfds;
@@ -519,7 +519,7 @@ int main(int argc, char *argv[])
goto terminate;
}
sprintf(pids, "%d", getpid());
- if ((res = write(lfd, pids, strlen(pids))) != strlen(pids)) {
+ if ((size_t)(res = write(lfd, pids, strlen(pids))) != strlen(pids)) {
usbmuxd_log(LL_FATAL, "Could not write pidfile!");
if(res >= 0)
res = -2;