From 85e3fcbd356b5e5c8b056ff098c2b43f704a9e27 Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Wed, 14 Oct 2009 19:43:52 +0200 Subject: [PATCH] export strict CFLAGS from finder to common folder and fix warnings We previously did not export the flags so a lot of warnings about implicit declarations and unused variables were not shown. Signed-off-by: Heiko Voigt --- common/debug.c | 1 + common/exec.c | 3 ++- common/git-compat-util.h | 3 +++ finder/Makefile | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/common/debug.c b/common/debug.c index 9732f08..d6ec75f 100644 --- a/common/debug.c +++ b/common/debug.c @@ -1,4 +1,5 @@ #include "git-compat-util.h" +#include "systeminfo.h" #include "debug.h" static char debug_git_file[MAX_PATH]; diff --git a/common/exec.c b/common/exec.c index a6878c7..9c3dcbd 100644 --- a/common/exec.c +++ b/common/exec.c @@ -1,3 +1,4 @@ +#include "git-compat-util.h" #include "cache.h" #include "debug.h" @@ -39,7 +40,7 @@ int exec_program_v(const char *working_directory, int flags, const char **argv) { int fdout[2], fderr[2]; - int s0 = -1, s1 = -1, s2 = -1; /* backups of stdin, stdout, stderr */ + int s1 = -1, s2 = -1; /* backups of stdin, stdout, stderr */ pid_t pid; int status = 0; diff --git a/common/git-compat-util.h b/common/git-compat-util.h index 21df864..61de778 100644 --- a/common/git-compat-util.h +++ b/common/git-compat-util.h @@ -27,6 +27,8 @@ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) +#include +#include #include #include #include @@ -37,6 +39,7 @@ #include #include #include +#include #ifdef _WIN32 #include #include diff --git a/finder/Makefile b/finder/Makefile index 66f4909..9db729f 100755 --- a/finder/Makefile +++ b/finder/Makefile @@ -9,6 +9,8 @@ COMMON_OBJ = ../common/cheetahmenu.o ../common/date.o ../common/debug.o \ ../common/sha1_file.o ../common/strbuf.o \ ../common/usage.o ../common/wrapper.o +export CFLAGS + all: $(TARGET).plugin common-obj: -- 2.11.4.GIT