Fix: compiling Warning, dpkg-buildflags ...
This commit is contained in:
parent
ecdddd6065
commit
f4e05b93e0
3 changed files with 13 additions and 11 deletions
10
Makefile
10
Makefile
|
|
@ -10,14 +10,16 @@ DEFINES =
|
||||||
DEFINES += -DLIBDIR='"$(libdir)"'
|
DEFINES += -DLIBDIR='"$(libdir)"'
|
||||||
DEFINES += -DETCDIR='"$(etcdir)"'
|
DEFINES += -DETCDIR='"$(etcdir)"'
|
||||||
|
|
||||||
DEB_CFLAGS_MAINT_APPEND=-Wall -O3 -Wno-format-zero-length
|
OPTIM =
|
||||||
|
OPTIM += -g
|
||||||
|
OPTIM += -O3
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LD = gcc
|
LD = gcc
|
||||||
INCLUDES = -I.
|
INCLUDES = -I.
|
||||||
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` $(INCLUDES) $(DEFINES)
|
CPPFLAGS = $(INCLUDES) $(DEFINES)
|
||||||
CFLAGS = `dpkg-buildflags --get CFLAGS`
|
CFLAGS = -Wall -Wformat-security $(OPTIM)
|
||||||
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
|
LDFLAGS =
|
||||||
LDLIBS =
|
LDLIBS =
|
||||||
INSTALL = install -c -D -o root -g root
|
INSTALL = install -c -D -o root -g root
|
||||||
|
|
||||||
|
|
|
||||||
6
garden.c
6
garden.c
|
|
@ -157,7 +157,7 @@ int plugin_become_master(void)
|
||||||
for (i = 0; up_commands[i] && *up_commands[i]; i++)
|
for (i = 0; up_commands[i] && *up_commands[i]; i++)
|
||||||
{
|
{
|
||||||
f->log(3, 0, 0, "Running %s\n", up_commands[i]);
|
f->log(3, 0, 0, "Running %s\n", up_commands[i]);
|
||||||
int status = system(up_commands[i]);
|
if (-1 == system(up_commands[i])) f->log(0, 0, 0, "error command %s\n", up_commands[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return PLUGIN_RET_OK;
|
return PLUGIN_RET_OK;
|
||||||
|
|
@ -273,7 +273,7 @@ int plugin_init(struct pluginfuncs *funcs)
|
||||||
for (i = 0; down_commands[i] && *down_commands[i]; i++)
|
for (i = 0; down_commands[i] && *down_commands[i]; i++)
|
||||||
{
|
{
|
||||||
f->log(3, 0, 0, "Running %s\n", down_commands[i]);
|
f->log(3, 0, 0, "Running %s\n", down_commands[i]);
|
||||||
int status = system(down_commands[i]);
|
if (-1 == system(down_commands[i])) f->log(0, 0, 0, "error command %s\n", down_commands[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,7 +290,7 @@ void plugin_done()
|
||||||
for (i = 0; down_commands[i] && *down_commands[i]; i++)
|
for (i = 0; down_commands[i] && *down_commands[i]; i++)
|
||||||
{
|
{
|
||||||
f->log(3, 0, 0, "Running %s\n", down_commands[i]);
|
f->log(3, 0, 0, "Running %s\n", down_commands[i]);
|
||||||
int status = system(down_commands[i]);
|
if (-1 == system(down_commands[i])) f->log(0, 0, 0, "error command %s\n", down_commands[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
8
l2tpns.c
8
l2tpns.c
|
|
@ -5050,9 +5050,9 @@ int main(int argc, char *argv[])
|
||||||
case 'd':
|
case 'd':
|
||||||
if (fork()) exit(0);
|
if (fork()) exit(0);
|
||||||
setsid();
|
setsid();
|
||||||
FILE *in = freopen("/dev/null", "r", stdin);
|
if(!freopen("/dev/null", "r", stdin)) LOG(0, 0, 0, "Error freopen stdin: %s\n", strerror(errno));
|
||||||
FILE *out = freopen("/dev/null", "w", stdout);
|
if(!freopen("/dev/null", "w", stdout)) LOG(0, 0, 0, "Error freopen stdout: %s\n", strerror(errno));
|
||||||
FILE *err = freopen("/dev/null", "w", stderr);
|
if(!freopen("/dev/null", "w", stderr)) LOG(0, 0, 0, "Error freopen stderr: %s\n", strerror(errno));
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
optdebug++;
|
optdebug++;
|
||||||
|
|
@ -5103,7 +5103,7 @@ int main(int argc, char *argv[])
|
||||||
LOG(0, 0, 0, "Can't set ulimit: %s\n", strerror(errno));
|
LOG(0, 0, 0, "Can't set ulimit: %s\n", strerror(errno));
|
||||||
|
|
||||||
// Make core dumps go to /tmp
|
// Make core dumps go to /tmp
|
||||||
int ret = chdir("/tmp");
|
if(chdir("/tmp")) LOG(0, 0, 0, "Error chdir /tmp: %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config->scheduler_fifo)
|
if (config->scheduler_fifo)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue