aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-07-08 17:07:11 +0000
committerBill Nottingham <notting@redhat.com>1999-07-08 17:07:11 +0000
commit0aeb63ad9b5462be2d7a868e8c76135ea8336203 (patch)
treea53d70f2f26a3af2fe423d6fe3ffeda25083919c /src
parent77b0bb06a826bff3e745bc10d2aff30bef514fe8 (diff)
downloadinitscripts-0aeb63ad9b5462be2d7a868e8c76135ea8336203.tar
initscripts-0aeb63ad9b5462be2d7a868e8c76135ea8336203.tar.gz
initscripts-0aeb63ad9b5462be2d7a868e8c76135ea8336203.tar.bz2
initscripts-0aeb63ad9b5462be2d7a868e8c76135ea8336203.tar.xz
initscripts-0aeb63ad9b5462be2d7a868e8c76135ea8336203.zip
fix some compiler warnings (nkbj@image.dk)
Diffstat (limited to 'src')
-rw-r--r--src/initlog.c6
-rw-r--r--src/process.c4
-rw-r--r--src/testd.c3
-rw-r--r--src/usleep.c2
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 <sys/signal.h>
#include <unistd.h>
-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 <string.h>
#include <stdio.h>
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
double count;