diff options
| author | William Hubbs <w.d.hubbs@gmail.com> | 2018-12-21 12:06:15 -0600 | 
|---|---|---|
| committer | William Hubbs <w.d.hubbs@gmail.com> | 2018-12-21 12:06:15 -0600 | 
| commit | ed8b768c4a68042eed0c21c8305640841b22f006 (patch) | |
| tree | 981a76893f35346ec5bab613f3e09b4b3ed2c3a7 | |
| parent | 825caa14de6160c966d44d64d5c0254f4038d9a0 (diff) | |
| download | openrc-ed8b768c4a68042eed0c21c8305640841b22f006.tar.xz | |
fix compiler warnings
| -rw-r--r-- | src/librc/librc-misc.c | 2 | ||||
| -rw-r--r-- | src/rc/broadcast.c | 2 | ||||
| -rw-r--r-- | src/rc/openrc-shutdown.c | 4 | ||||
| -rw-r--r-- | src/rc/supervise-daemon.c | 3 | 
4 files changed, 3 insertions, 8 deletions
| diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c index 178768c5..4ff7f439 100644 --- a/src/librc/librc-misc.c +++ b/src/librc/librc-misc.c @@ -277,7 +277,6 @@ static RC_STRINGLIST *rc_config_kcl(RC_STRINGLIST *config)  	char *tmp = NULL;  	char *value = NULL;  	size_t varlen = 0; -	size_t len = 0;  	overrides = rc_stringlist_new(); @@ -295,7 +294,6 @@ static RC_STRINGLIST *rc_config_kcl(RC_STRINGLIST *config)  		}  		if (value != NULL) { -			len = varlen + strlen(value) + 2;  			xasprintf(&tmp, "%s=%s", override->value, value);  		} diff --git a/src/rc/broadcast.c b/src/rc/broadcast.c index 47e4ff6b..1a29c796 100644 --- a/src/rc/broadcast.c +++ b/src/rc/broadcast.c @@ -133,7 +133,7 @@ void broadcast(char *text)  	char *p;  	char *line = NULL;  	struct sigaction sa; -	int fd; +	volatile int fd;  	FILE *tp;  	int	flags;  	char *term = NULL; diff --git a/src/rc/openrc-shutdown.c b/src/rc/openrc-shutdown.c index e39f1316..2c8863bb 100644 --- a/src/rc/openrc-shutdown.c +++ b/src/rc/openrc-shutdown.c @@ -160,9 +160,7 @@ static void sleep_no_interrupt(int seconds)  static void stop_shutdown(int sig)  { -	/* use the sig parameter so the compiler will not complain */ -	if (sig == SIGINT) -		; +	(void) sig;  	unlink(nologin_file);  	unlink(shutdown_pid);  einfo("Shutdown canceled"); diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c index 8fd41006..bf958607 100644 --- a/src/rc/supervise-daemon.c +++ b/src/rc/supervise-daemon.c @@ -267,7 +267,7 @@ static char *make_cmdline(char **argv)  	return cmdline;  } -static pid_t exec_command(char *cmd) +static pid_t exec_command(const char *cmd)  {  	char *file;  	pid_t pid = -1; @@ -510,7 +510,6 @@ static void supervisor(char *exec, char **argv)  	int healthcheck_respawn;  	int i;  	int nkilled; -	int ready;  	int sig_send;  	pid_t health_pid;  	pid_t wait_pid; | 
