Fix signedness warning in gio/gmemoryoutputstream.c

gio/gmemoryoutputstream.c: In function ‘g_memory_output_stream_seek’:
gio/gmemoryoutputstream.c:792:44: error: comparison of integer expressions of different signedness: ‘goffset’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’}
  792 |   if (priv->realloc_fn == NULL && absolute > priv->len)
      |                                            ^
This commit is contained in:
Emmanuel Fleury 2020-11-18 19:36:21 +01:00
parent e939550cad
commit 0dde9f3744

View File

@ -789,7 +789,7 @@ g_memory_output_stream_seek (GSeekable *seekable,
* stream is valid (eg: a 1-byte fixed sized stream can have position
* 0 or 1). Therefore '>' is what we want.
* */
if (priv->realloc_fn == NULL && absolute > priv->len)
if (priv->realloc_fn == NULL && (gsize) absolute > priv->len)
{
g_set_error_literal (error,
G_IO_ERROR,