The warning is triggered when compiling with various build options, such
as -Doptimization=g.
From gcc(1) man page about -Winline:
seemingly insignificant changes in the source program can cause the warnings produced by -Winline to appear or disappear.
Such flaky behaviour is best left to the user discretion.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
'-Wimplicit-int',
'-Wincompatible-pointer-types',
'-Winit-self',
- '-Winline',
'-Wint-conversion',
'-Wint-in-bool-context',
'-Wint-to-pointer-cast',
'-Wwrite-strings',
]
+if get_option('optimization') != 'g'
+ # Seemingly insignificant changes in the source program can cause the warnings
+ # produced by -Winline to appear or disappear.
+ cc_flags += [ '-Winline' ]
+endif
+
if cc.get_id() == 'clang'
# Stop CLang from doing inter-procedural analysis of calls
# between functions in the same compilation unit. Such an