This was probably dropped in the conversion away from Kconfig.
Having -Wall enabled would have caught the bug raised at https://issuetracker.google.com/112319097:
../mosys-9999/platform/glados/glados.c:120:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
if (!cros_config_smbios_platform_name_match(intf, "Nautilus")) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../mosys-9999/platform/glados/glados.c:141:9: note: uninitialized use occurs here
return ret;
^~~
../mosys-9999/platform/glados/glados.c:120:2: note: remove the 'if' if its condition is always true
if (!cros_config_smbios_platform_name_match(intf, "Nautilus")) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../mosys-9999/platform/glados/glados.c:108:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 error generated.
It's straightfoward enough to turn this back on, and we should if only to keep from encountering these bugs.
I hit the above warning with this patch:
teravest@teravest5:~/cros/src/platform/mosys$ git diff
diff --git a/meson.build b/meson.build
index 4068d06..ab6206f 100644
--- a/meson.build
+++ b/meson.build
@@ -39,6 +39,7 @@ cc = meson.get_compiler('c')
if (cc.has_argument('-Wno-address-of-packed-member'))
add_global_arguments(['-Wno-address-of-packed-member'], language: 'c')
endif
+add_global_arguments('-Wall', language : 'c')
add_global_arguments('-Werror', language : 'c')
# External libs used by Mosys
Comment 1 by gmeinke@chromium.org
, Aug 21Status: Duplicate (was: Untriaged)