diff --git a/Makefile b/Makefile index c989e61..74da5ac 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ MANDIR = /usr/share/man/man1 DOCDIRS = doc/html doc/latex PDF = doc/latex/refman.pdf +CFLAGS += -Wall -Wextra + all: codecheck test clean: diff --git a/mnexec.c b/mnexec.c index a563499..b7be9bc 100644 --- a/mnexec.c +++ b/mnexec.c @@ -13,6 +13,7 @@ * Partially based on public domain setsid(1) */ +#define _GNU_SOURCE #include #include #include @@ -20,8 +21,8 @@ #include #include #include -#include #include +#include #if !defined(VERSION) #define VERSION "(devel)" @@ -62,7 +63,7 @@ void validate(char *path) } /* Add our pid to cgroup */ -int cgroup(char *gname) +void cgroup(char *gname) { static char path[PATH_MAX]; static char *groups[] = { @@ -176,4 +177,6 @@ int main(int argc, char *argv[]) } usage(argv[0]); + + return 0; }