Skip to content

Fixing signedness warning in glib/gfileutils.c

glib/gfileutils.c: In function ‘write_to_file’:
glib/gfileutils.c:1176:19: error: comparison of integer expressions of different signedness: 
‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} [-Werror=sign-compare]
 1176 |       g_assert (s <= length);
      |                   ^~
glib/gmacros.h:939:25: note: in definition of macro ‘G_LIKELY’
  939 | #define G_LIKELY(expr) (expr)
      |                         ^~~~
glib/gfileutils.c:1176:7: note: in expansion of macro ‘g_assert’
 1176 |       g_assert (s <= length);
      |       ^~~~~~~~

Related to issue #1735 (closed) (Get back to a -werror build).

Edited by Emmanuel Fleury

Merge request reports