mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
Fix signedness warnings in gio/gcredentials.c
gio/gcredentials.c: In function ‘linux_ucred_check_valid’: gio/gcredentials.c:317:22: error: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’ 317 | || native->uid == -1 | ^~ gio/gcredentials.c:318:22: error: comparison of integer expressions of different signedness: ‘gid_t’ {aka ‘unsigned int’} and ‘int’ 318 | || native->gid == -1) | ^~ gio/gcredentials.c: In function ‘g_credentials_set_unix_user’: gio/gcredentials.c:639:29: error: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’ 639 | g_return_val_if_fail (uid != -1, FALSE); | ^~
This commit is contained in:
parent
e54cfb82f2
commit
6e3d30a105
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user