xdgmime: Disable -Wsign-conversion warning inside xdgmime

The code wasn’t written for it, and we don’t want to diverge from
upstream for this, so disable -Wsign-conversion in case it was set for
the overall GLib build.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3405
This commit is contained in:
Philip Withnall 2025-04-10 20:17:13 +01:00
parent 7aeb4d94f2
commit 98ab3d7a87
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA

View File

@ -9,11 +9,20 @@ xdgmime_sources = files(
'xdgmimeparent.c',
)
# glib enables various warnings which the xdgmime code wasnt designed to
# work with
extra_xdgmime_args = cc.get_supported_arguments([
'-Wno-sign-conversion',
])
xdgmime_lib = static_library('xdgmime',
sources : xdgmime_sources,
include_directories : [configinc],
pic : true,
c_args : [ '-DHAVE_CONFIG_H',
'-DXDG_PREFIX=_gio_xdg' ],
c_args : [
'-DHAVE_CONFIG_H',
'-DXDG_PREFIX=_gio_xdg',
extra_xdgmime_args,
],
gnu_symbol_visibility : 'hidden',
)