Skip to content

tests: Add a -Wsign-conversion test for gstring.h

Philip Withnall requested to merge pwithnall/glib:w-sign-conversion into main

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 (closed)).

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 (closed)

Merge request reports