aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2023-12-01 16:21:40 -0500
committerBoringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-12-04 22:43:35 +0000
commita9a4c6dc89aff96f64c6ed93c1c3fc4d0c8e6e74 (patch)
tree678d4b54b3e24a40c607edfbf5b142564d6cc374 /CMakeLists.txt
parentf78fe19fc98e0e6f760e05c6b9d48725004700d0 (diff)
downloadboringssl-a9a4c6dc89aff96f64c6ed93c1c3fc4d0c8e6e74.zip
boringssl-a9a4c6dc89aff96f64c6ed93c1c3fc4d0c8e6e74.tar.gz
boringssl-a9a4c6dc89aff96f64c6ed93c1c3fc4d0c8e6e74.tar.bz2
Fix build with -Wmissing-field-initializers
Since it's otherwise pretty tedious, let's try this with C99 designated initializers. From testing, I remember they worked pretty reliably in C. (In C++, it's a little trickier because MSVC won't accept them outside C++20. Although I think all our supported MSVCs have a C++20 mode now...) Fixed: 671 Change-Id: Ia29ade8721ecfe2140a2d183ad60c8a730c631f0 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64447 Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2c2eb88..4c7926d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,8 +139,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
if(CMAKE_COMPILER_IS_GNUCXX OR CLANG)
# Note clang-cl is odd and sets both CLANG and MSVC. We base our configuration
# primarily on our normal Clang one.
- # TODO(bbe) took out -Wmissing-field-initializers for pki - fix and put back or disable only for pki
- set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wwrite-strings -Wvla -Wshadow -Wtype-limits")
+ set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wwrite-strings -Wvla -Wshadow -Wtype-limits -Wmissing-field-initializers")
if(MSVC)
# clang-cl sets different default warnings than clang. It also treats -Wall
# as -Weverything, to match MSVC. Instead -W3 is the alias for -Wall.