From 4d251d50012f9af325f0ee4dc9cc2f909b6fbb32 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 13 May 2021 15:36:27 -0400 Subject: [PATCH] TT#111150 disable -Wmissing-field-initializers for gperf Code generated by gperf does not have complete initialisers for all struct elements, producing a warning from gcc. Suppress this warning for code from gperf. Change-Id: Ie61eb42b293041e43c62df702123f725f6116a9c --- utils/const_str_hash | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/const_str_hash b/utils/const_str_hash index 0d18742ae..3800ae08a 100755 --- a/utils/const_str_hash +++ b/utils/const_str_hash @@ -62,7 +62,10 @@ $hash_func_code =~ s/(^|\s)struct\s+__csh_hash_lookup\s*\*/\nstatic$&/s; # print combined output +print "#pragma GCC diagnostic push\n"; +print "#pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"\n"; print $hash_func_code; +print "#pragma GCC diagnostic pop\n"; # add convenience function print <