[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1376509169-29141-1-git-send-email-slyfox@gentoo.org>
Date: Wed, 14 Aug 2013 22:39:29 +0300
From: Sergei Trofimovich <slyfox@...too.org>
To: linux-kernel@...r.kernel.org
Cc: Sergei Trofimovich <slyfox@...too.org>,
Michal Marek <mmarek@...e.cz>, linux-kbuild@...r.kernel.org
Subject: [PATCH] Makefile: enable -Werror=implicit-int and -Werror=strict-prototypes by default
The common error fount in forward-ported/backported patches is missing headers.
One recent example (files and function names are mangled):
void foo(){}
EXPORT_SYMBOL(foo);
gave only warning
foo.c:12345678:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
void foo(){}
^
foo.c:12345679:5: warning: data definition has no type or storage class [enabled by default]
EXPORT_SYMBOL(foo);
foo.c:12345679:5: warning: type defaults to 'int' in declaration of 'EXORT_SYMBOL' [-Werror=implicit-int]
Now it's a fatal error. Tested on x86_64 allyesconfig.
Cc: Michal Marek <mmarek@...e.cz>
Cc: linux-kbuild@...r.kernel.org
Signed-off-by: Sergei Trofimovich <slyfox@...too.org>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 6e48848..eda0126 100644
--- a/Makefile
+++ b/Makefile
@@ -372,6 +372,8 @@ KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
+ -Werror=implicit-int \
+ -Werror=strict-prototypes \
-Wno-format-security \
-fno-delete-null-pointer-checks
KBUILD_AFLAGS_KERNEL :=
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists