sm

sysmgr implemented in C
git clone git://git.ckyln.com/sm
Log | Files | Refs | README | LICENSE

commit b8691f57c8232447ef0c0c6bb906f58576e604e4
parent 36ef650ded2f766e1c20762f63683d8add319eee
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat, 10 Oct 2020 11:49:07 +0300

runsyssv/svctl/sysmgr-depends.c: deal with unused variables

Diffstat:
Mrunsyssv.c | 8++++----
Msvctl.c | 3+++
Msysmgr-depends.c | 4++++
3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/runsyssv.c b/runsyssv.c @@ -14,7 +14,6 @@ #include "config.h" static char *argv0, *lockfile, *svrundir; static pid_t syspid, svpid; -static struct service sv; void usage(int exitnum) @@ -43,10 +42,11 @@ term(int sig) int main(int argc, char *argv[]) { + /* Variables used by other functions but not in this file itself */ + (void)(sysdir_default); + (void)(rundir_default); + argv0 = argv[0]; - char *sysdir, *rundir; - sysdir = getenv_fallback("SYSDIR", sysdir_default); - rundir = getenv_fallback("RUNDIR", rundir_default); if (argc == 2) { if (strncmp(argv[1], "-", 1) == 0) diff --git a/svctl.c b/svctl.c @@ -101,6 +101,9 @@ int handle_service(char *operation, char *name) int main(int argc, char *argv[]) { + /* Variable used by other functions but not in this file itself */ + (void)(sysdir_default); + char *rundir; argv0 = argv[0]; int i, exitnum; diff --git a/sysmgr-depends.c b/sysmgr-depends.c @@ -17,6 +17,10 @@ usage(void) int main (int argc, char *argv[]) { + /* Variables used by other functions but not in this file itself */ + (void)(sysdir_default); + (void)(rundir_default); + int i; argv0 = argv[0]; if (argc < 2 || strncmp(argv[1], "-", 1) == 0)