From cf07bcddd79beb6a0920384690a162c847801d7c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 17 Feb 2022 09:10:25 +0100 Subject: Drop -Wdeclaration-after-statement It was introduced, without a rationale, into unxgcc.mk in eb09adaa9a2accbdc3531bb96447c8e7fbb9f8a9 "Warn if declaration follows statement in C-files", then carried over to clang-cl (com_MSC_defs.mk) with 9055fb48402eaeb9ba876b7893e2f9a39fea06b1 "clang-cl: Enable more warnings etc. (like in the Clang/GCC case)", where it now started to cause > cppuhelper/source/findsofficepath.c(102,20): error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement] > const wchar_t* SUBKEYNAME = L"Software\\LibreOffice\\UNO\\InstallPath"; > ^ after "[clang][#51931] Enable -Wdeclaration-after-statement for all C versions". Lets remove it from all toolchain settings, there appears to be not much value anymore in such a warning about pre-C99 code. Change-Id: Id4669089e46c97aaa926e5bd202c36eb5984b837 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- solenv/gbuild/platform/unxgcc.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'solenv/gbuild/platform/unxgcc.mk') diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index c70e3ce222bb..a0aead205c12 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -39,7 +39,6 @@ gb_OSDEFS := \ gb_CFLAGS := \ $(gb_CFLAGS_COMMON) \ -fPIC \ - -Wdeclaration-after-statement \ -Wshadow \ # At least libstdc++ needs -pthread when including various C++ headers like , see -- cgit