mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
Fix signedness warnings in gio/ghttpproxy.c:g_http_proxy_connect()
gio/ghttpproxy.c: In function ‘g_http_proxy_connect’: gio/ghttpproxy.c:245:17: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘int’ 245 | if (nread == -1) | ^~ gio/ghttpproxy.c:253:22: error: comparison of integer expressions of different signedness: ‘gssize’ {aka ‘long int’} and ‘gsize’ {aka ‘long unsigned int’} 253 | if (bytes_read == buffer_length) | ^~
This commit is contained in:
parent
2fd429046d
commit
ccb43b3821
@ -190,7 +190,7 @@ g_http_proxy_connect (GProxy *proxy,
|
||||
GOutputStream *out;
|
||||
gchar *buffer = NULL;
|
||||
gsize buffer_length;
|
||||
gssize bytes_read;
|
||||
gsize bytes_read;
|
||||
gboolean has_cred;
|
||||
GIOStream *tlsconn = NULL;
|
||||
|
||||
@ -239,12 +239,15 @@ g_http_proxy_connect (GProxy *proxy,
|
||||
*/
|
||||
do
|
||||
{
|
||||
gssize signed_nread;
|
||||
gsize nread;
|
||||
|
||||
nread = g_input_stream_read (in, buffer + bytes_read, 1, cancellable, error);
|
||||
if (nread == -1)
|
||||
signed_nread =
|
||||
g_input_stream_read (in, buffer + bytes_read, 1, cancellable, error);
|
||||
if (signed_nread == -1)
|
||||
goto error;
|
||||
|
||||
nread = signed_nread;
|
||||
if (nread == 0)
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user