Fix signedness warning in gio/ginputstream.c

gio/ginputstream.c: In function 'g_input_stream_real_skip':
gio/ginputstream.c:433:31: error: comparison of integer expressions of different signedness: 'goffset' {aka 'long long int'} and 'long long unsigned int'
  433 |               (start + count) > (guint64) end)
      |                               ^
This commit is contained in:
Emmanuel Fleury 2021-11-04 22:05:30 +01:00
parent 8c35109a21
commit dea0ec3df6

View File

@ -429,8 +429,8 @@ g_input_stream_real_skip (GInputStream *stream,
end = g_seekable_tell (seekable);
g_assert (start >= 0);
g_assert (end >= start);
if ((guint64) start > (G_MAXSIZE - count) ||
(start + count) > (guint64) end)
if (start > (goffset) (G_MAXOFFSET - count) ||
(goffset) (start + count) > end)
{
stream->priv->pending = TRUE;
return end - start;