mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 23:46:15 +01:00
tests: Add a -Wsign-conversion test for gstring.h
While it’s not possible to build GLib with `-Wsign-conversion` enabled (there are too many warnings), it would be useful to check that GLib’s public headers can be used with `-Wsign-conversion` enabled, as some projects want to do that. For example, dnf5 is built that way (see issue #2919). Add a simple regression test for this, by re-building the `gstring` tests with `-Wsign-conversion` enabled. Since they include `glib.h`, this will test all the public libglib headers by proxy. Since this is a compile-only test, it doesn’t need to be installed. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2919
This commit is contained in:
parent
0bdf7fcce4
commit
bc53fff8a3
@ -129,6 +129,11 @@ glib_tests = {
|
||||
},
|
||||
'strfuncs' : {},
|
||||
'string' : {},
|
||||
'string-macro' : {
|
||||
'source' : 'string.c',
|
||||
'c_args' : cc.get_id() == 'gcc' ? ['-Werror=sign-conversion'] : [],
|
||||
'install' : false,
|
||||
},
|
||||
'strvbuilder' : {},
|
||||
'testing' : {
|
||||
'args': [ '--verbose' ],
|
||||
|
Loading…
Reference in New Issue
Block a user