From 0aeb63ad9b5462be2d7a868e8c76135ea8336203 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 8 Jul 1999 17:07:11 +0000 Subject: fix some compiler warnings (nkbj@image.dk) --- src/initlog.c | 6 +++--- src/process.c | 4 ++-- src/testd.c | 3 ++- src/usleep.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/initlog.c b/src/initlog.c index 5479ac1f..a8971e25 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -110,7 +110,7 @@ int startDaemon() { int logLine(struct logInfo *logEnt) { /* Logs a line... somewhere. */ - int x=0,y=0,z=0; + int x; struct stat statbuf; /* Don't log empty or null lines */ @@ -156,7 +156,7 @@ int logEvent(char *cmd, int eventtype,char *string) { struct logInfo logentry; if (cmd) { - logentry.cmd = strdup(basename(cmd)); + logentry.cmd = strdup((char *)basename(cmd)); if ((logentry.cmd[0] =='K' || logentry.cmd[0] == 'S') && ( 30 <= logentry.cmd[1] <= 39 ) && ( 30 <= logentry.cmd[2] <= 39 ) ) logentry.cmd+=3; @@ -182,7 +182,7 @@ int logString(char *cmd, char *string) { struct logInfo logentry; if (cmd) { - logentry.cmd = strdup(basename(cmd)); + logentry.cmd = strdup((char *)basename(cmd)); if ((logentry.cmd[0] =='K' || logentry.cmd[0] == 'S') && ( 30 <= logentry.cmd[1] <= 39 ) && ( 30 <= logentry.cmd[2] <= 39 ) ) logentry.cmd+=3; diff --git a/src/process.c b/src/process.c index 24650727..73c46945 100644 --- a/src/process.c +++ b/src/process.c @@ -208,9 +208,9 @@ int runCommand(char *cmd, int reexec, int quiet, int debug) { } args[pid] = NULL; if (strcmp(args[0],"sh") && strcmp(args[0],"/bin/sh")) - cmdname = basename(args[0]); + cmdname = (char *)basename(args[0]); else - cmdname = basename(args[1]); + cmdname = (char *)basename(args[1]); if ((cmdname[0] =='K' || cmdname[0] == 'S') && ( 30 <= cmdname[1] <= 39 ) && ( 30 <= cmdname[2] <= 39 ) ) cmdname+=3; diff --git a/src/testd.c b/src/testd.c index f512cec9..7deb00eb 100644 --- a/src/testd.c +++ b/src/testd.c @@ -1,7 +1,8 @@ #include #include -void main() { +int main() { signal(SIGTERM, SIG_IGN); while (1) sleep(20); + exit(0); } diff --git a/src/usleep.c b/src/usleep.c index dbffc850..2d0a5565 100644 --- a/src/usleep.c +++ b/src/usleep.c @@ -11,7 +11,7 @@ #include #include -void main(int argc, char **argv) +int main(int argc, char **argv) { double count; -- cgit v1.2.1