mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +01:00
Fix signedness warnings in gio/ginputstream.c
gio/ginputstream.c: In function ‘g_input_stream_real_skip’: gio/ginputstream.c:431:21: warning: comparison of integer expressions of different signedness: ‘goffset’ {aka ‘long int’} and ‘long unsigned int’ 431 | if (start > G_MAXSIZE - count || start + count > end) | ^ gio/ginputstream.c:431:58: warning: comparison of integer expressions of different signedness: ‘long unsigned int’ and ‘goffset’ {aka ‘long int’} 431 | if (start > G_MAXSIZE - count || start + count > end) | ^
This commit is contained in:
parent
7a50c3184d
commit
f2be8c74e5
@ -427,8 +427,10 @@ g_input_stream_real_skip (GInputStream *stream,
|
|||||||
NULL))
|
NULL))
|
||||||
{
|
{
|
||||||
end = g_seekable_tell (seekable);
|
end = g_seekable_tell (seekable);
|
||||||
|
g_assert (start >= 0);
|
||||||
g_assert (end >= start);
|
g_assert (end >= start);
|
||||||
if (start > G_MAXSIZE - count || start + count > end)
|
if ((guint64) start > (G_MAXSIZE - count) ||
|
||||||
|
(start + count) > (guint64) end)
|
||||||
{
|
{
|
||||||
stream->priv->pending = TRUE;
|
stream->priv->pending = TRUE;
|
||||||
return end - start;
|
return end - start;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user