OSDN Git Service

configure: Make warnings from -Wreturn-type fatal errors
authorDiego Biurrun <diego@biurrun.de>
Mon, 14 Jan 2013 19:38:33 +0000 (20:38 +0100)
committerDiego Biurrun <diego@biurrun.de>
Mon, 14 Jan 2013 21:49:44 +0000 (22:49 +0100)
These warnings have no false positives and point to serious bugs.

configure

index 3d5fe7c..375865e 100755 (executable)
--- a/configure
+++ b/configure
@@ -3684,6 +3684,7 @@ elif enabled gcc; then
     check_optflags -fno-tree-vectorize
     check_cflags -Werror=implicit-function-declaration
     check_cflags -Werror=missing-prototypes
+    check_cflags -Werror=return-type
     check_cflags -Werror=declaration-after-statement
     check_cflags -Werror=vla
 elif enabled llvm_gcc; then
@@ -3693,6 +3694,7 @@ elif enabled clang; then
     check_cflags -Qunused-arguments
     check_cflags -Werror=implicit-function-declaration
     check_cflags -Werror=missing-prototypes
+    check_cflags -Werror=return-type
 elif enabled armcc; then
     # 2523: use of inline assembler is deprecated
     add_cflags -W${armcc_opt},--diag_suppress=2523