[MSVC] gstring.h: warning C4141: 'inline': used more than once
When compiling with MSVC we get lots of repeated warnings like:
[1/41] Compiling C object glib/glib-2.0-0.dll.p/gstdio.c.obj
D:\glib\glib/gstring.h(170): warning C4141: 'inline': used more than once
D:\glib\glib/gstring.h(186): warning C4141: 'inline': used more than once
D:\glib\glib/gstring.h(211): warning C4141: 'inline': used more than once
I see that some functions have both G_ALWAYS_INLINE
and inline
: https://gitlab.gnome.org/GNOME/glib/-/blob/76639a36204ef42ee08cf3736b499dd42f70512e/glib/gstring.h#L173
#ifdef G_CAN_INLINE
G_ALWAYS_INLINE
static inline GString*
g_string_append_c_inline (GString *gstring,
gchar c)
{
if (G_LIKELY (gstring->len + 1 < gstring->allocated_len))
{
gstring->str[gstring->len++] = c;
gstring->str[gstring->len] = 0;
}
else
g_string_insert_c (gstring, -1, c);
return gstring;
}
/* ... */
Not sure if there's no harm in removing inline
though...