Changeset: 35760531b6aa for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35760531b6aa
Modified Files:
        cmake/Toolchains/linux-gnu.cmake
        cmake/monetdb-toolchain.cmake
        sql/include/exception_buffer.h
Branch: Oct2020
Log Message:

Added missing -Wmissing-noreturn and -Wuninitialized compilation flags. 
eb_error function was missing _Noreturn attribute. Also added missing license. 
Time to test on other platforms


diffs (50 lines):

diff --git a/cmake/Toolchains/linux-gnu.cmake b/cmake/Toolchains/linux-gnu.cmake
--- a/cmake/Toolchains/linux-gnu.cmake
+++ b/cmake/Toolchains/linux-gnu.cmake
@@ -16,7 +16,6 @@
     #  MT_checkCompilerFlag("-Wdisabled-optimization")
     #  MT_checkCompilerFlag("-Wfloat-equal")
     #  MT_checkCompilerFlag("-Winline")
-    #  MT_checkCompilerFlag("-Wmissing-noreturn")
     #  MT_checkCompilerFlag("-Wpadded")
     #  MT_checkCompilerFlag("-Wredundant-decls")
     #  MT_checkCompilerFlag("-Wshadow")
diff --git a/cmake/monetdb-toolchain.cmake b/cmake/monetdb-toolchain.cmake
--- a/cmake/monetdb-toolchain.cmake
+++ b/cmake/monetdb-toolchain.cmake
@@ -55,6 +55,8 @@ function(monetdb_default_toolchain)
       MT_checkCompilerFlag("-Wduplicated-branches")
       MT_checkCompilerFlag("-Wrestrict")
       MT_checkCompilerFlag("-Wnested-externs")
+      MT_checkCompilerFlag("-Wmissing-noreturn")
+      MT_checkCompilerFlag("-Wuninitialized")
 
       # since we use values of type "int8_t" as subscript,
       # and int8_t may be defined as plain "char", we cannot
diff --git a/sql/include/exception_buffer.h b/sql/include/exception_buffer.h
--- a/sql/include/exception_buffer.h
+++ b/sql/include/exception_buffer.h
@@ -1,6 +1,15 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0.  If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Copyright 1997 - July 2008 CWI, August 2008 - 2020 MonetDB B.V.
+ */
+
 #ifndef EXCEPTION_BUFFER_H
 #define EXCEPTION_BUFFER_H
 
+#include "monetdb_config.h"
 #include <setjmp.h>
 
 typedef struct exception_buffer {
@@ -14,6 +23,6 @@ extern exception_buffer *eb_init( except
 
 /* != 0 on when we return to the savepoint */
 #define eb_savepoint(eb) ((eb)->enabled=1,setjmp((eb)->state))
-extern void eb_error( exception_buffer *eb, char *msg, int val );
+extern _Noreturn void eb_error( exception_buffer *eb, char *msg, int val );
 
 #endif /* EXCEPTION_BUFFER_H */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to