mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Merge branch 'fix_more_warnings' into 'master'
Fix more warnings See merge request GNOME/glib!1823
This commit is contained in:
commit
8d78b92794
@ -314,8 +314,8 @@ linux_ucred_check_valid (struct ucred *native,
|
||||
GError **error)
|
||||
{
|
||||
if (native->pid == 0
|
||||
|| native->uid == -1
|
||||
|| native->gid == -1)
|
||||
|| native->uid == (uid_t) -1
|
||||
|| native->gid == (gid_t) -1)
|
||||
{
|
||||
g_set_error_literal (error,
|
||||
G_IO_ERROR,
|
||||
@ -636,7 +636,7 @@ g_credentials_set_unix_user (GCredentials *credentials,
|
||||
gboolean ret = FALSE;
|
||||
|
||||
g_return_val_if_fail (G_IS_CREDENTIALS (credentials), FALSE);
|
||||
g_return_val_if_fail (uid != -1, FALSE);
|
||||
g_return_val_if_fail (uid != (uid_t) -1, FALSE);
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
#if G_CREDENTIALS_USE_LINUX_UCRED
|
||||
|
@ -2344,7 +2344,7 @@ g_output_stream_real_writev (GOutputStream *stream,
|
||||
|
||||
_bytes_written += res;
|
||||
/* if we had a short write break the loop here */
|
||||
if (res < vectors[i].size)
|
||||
if ((gsize) res < vectors[i].size)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ g_pollable_output_stream_default_writev_nonblocking (GPollableOutputStream *str
|
||||
|
||||
_bytes_written += res;
|
||||
/* if we had a short write break the loop here */
|
||||
if (res < vectors[i].size)
|
||||
if ((gsize) res < vectors[i].size)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
typedef struct {
|
||||
gchar *name;
|
||||
gint length;
|
||||
gsize length;
|
||||
gushort port;
|
||||
} GSimpleProxyResolverDomain;
|
||||
|
||||
@ -259,7 +259,8 @@ ignore_host (GSimpleProxyResolver *resolver,
|
||||
GSimpleProxyResolverPrivate *priv = resolver->priv;
|
||||
gchar *ascii_host = NULL;
|
||||
gboolean ignore = FALSE;
|
||||
gint i, length, offset;
|
||||
gsize offset, length;
|
||||
guint i;
|
||||
|
||||
if (priv->ignore_ips)
|
||||
{
|
||||
@ -297,6 +298,9 @@ ignore_host (GSimpleProxyResolver *resolver,
|
||||
{
|
||||
GSimpleProxyResolverDomain *domain = &priv->ignore_domains[i];
|
||||
|
||||
if (domain->length > length)
|
||||
continue;
|
||||
|
||||
offset = length - domain->length;
|
||||
if ((domain->port == 0 || domain->port == port) &&
|
||||
(offset == 0 || (offset > 0 && host[offset - 1] == '.')) &&
|
||||
|
@ -3767,7 +3767,9 @@ static GSourceFuncs broken_funcs =
|
||||
NULL,
|
||||
NULL,
|
||||
broken_dispatch,
|
||||
NULL
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
@ -4082,6 +4084,7 @@ static GSourceFuncs socket_source_funcs =
|
||||
socket_source_dispatch,
|
||||
socket_source_finalize,
|
||||
(GSourceFunc)socket_source_closure_callback,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static GSource *
|
||||
@ -4533,7 +4536,7 @@ G_STMT_START { \
|
||||
else \
|
||||
/* ABI is incompatible */ \
|
||||
{ \
|
||||
gint i; \
|
||||
guint i; \
|
||||
\
|
||||
_msg->msg_iov = g_newa (struct iovec, _message->num_vectors); \
|
||||
for (i = 0; i < _message->num_vectors; i++) \
|
||||
@ -4548,7 +4551,7 @@ G_STMT_START { \
|
||||
/* control */ \
|
||||
{ \
|
||||
struct cmsghdr *cmsg; \
|
||||
gint i; \
|
||||
guint i; \
|
||||
\
|
||||
_msg->msg_controllen = 0; \
|
||||
for (i = 0; i < _message->num_control_messages; i++) \
|
||||
@ -5161,7 +5164,7 @@ g_socket_send_messages_with_timeout (GSocket *socket,
|
||||
#if !defined (G_OS_WIN32) && defined (HAVE_SENDMMSG)
|
||||
{
|
||||
struct mmsghdr *msgvec;
|
||||
gint i, num_sent;
|
||||
guint i, num_sent;
|
||||
|
||||
/* Clamp the number of vectors if more given than we can write in one go.
|
||||
* The caller has to handle short writes anyway.
|
||||
|
Loading…
Reference in New Issue
Block a user