gnucash maint: Allow C decls after statements.
John Ralls
jralls at code.gnucash.org
Mon Feb 27 20:26:41 EST 2023
Updated via https://github.com/Gnucash/gnucash/commit/61ae38fd (commit)
from https://github.com/Gnucash/gnucash/commit/7f0353ad (commit)
commit 61ae38fdf56b6db8719a5ed1a2df673a3d1da612
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Feb 27 17:26:32 2023 -0800
Allow C decls after statements.
Legal since C99.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a4bacf3f..45b893574 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -581,14 +581,14 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
if (UNIX)
- set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}")
+ set( CMAKE_C_FLAGS "-Werror -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}")
set( CMAKE_C_FLAGS "-Wno-error=deprecated-declarations -Wno-error=parentheses ${CMAKE_C_FLAGS}")
set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses ${CMAKE_CXX_FLAGS}")
set( CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations ${REGISTER_CXXFLAG} ${CMAKE_CXX_FLAGS}")
set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}")
endif()
if (MINGW)
- set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-error=deprecated-declarations ${CMAKE_C_FLAGS}")
+ set( CMAKE_C_FLAGS "-Werror -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wno-error=deprecated-declarations ${CMAKE_C_FLAGS}")
set( CMAKE_CXX_FLAGS "-DWINVER=0x0500 -D_EMULATE_GLIBC=0 ${CMAKE_CXX_FLAGS}") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 and https://github.com/google/googletest/issues/920
endif()
Summary of changes:
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list