mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
Fix signedness warning in gio/glocalfileinfo.c:get_access_rights()
gio/glocalfileinfo.c: In function ‘get_access_rights’: gio/glocalfileinfo.c:932:9: error: comparison of integer expressions of different signedness: ‘uid_t’ {aka ‘unsigned int’} and ‘int’ 932 | uid == parent_info->owner || | ^~
This commit is contained in:
parent
4260193cff
commit
f598a93332
@ -929,7 +929,7 @@ get_access_rights (GFileAttributeMatcher *attribute_matcher,
|
|||||||
uid_t uid = geteuid ();
|
uid_t uid = geteuid ();
|
||||||
|
|
||||||
if (uid == _g_stat_uid (statbuf) ||
|
if (uid == _g_stat_uid (statbuf) ||
|
||||||
uid == parent_info->owner ||
|
uid == (uid_t) parent_info->owner ||
|
||||||
uid == 0)
|
uid == 0)
|
||||||
writable = TRUE;
|
writable = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ typedef struct
|
|||||||
gboolean writable;
|
gboolean writable;
|
||||||
gboolean is_sticky;
|
gboolean is_sticky;
|
||||||
gboolean has_trash_dir;
|
gboolean has_trash_dir;
|
||||||
|
/* owner should be uid_t but it breaks compliance with MS-Windows */
|
||||||
int owner;
|
int owner;
|
||||||
dev_t device;
|
dev_t device;
|
||||||
ino_t inode;
|
ino_t inode;
|
||||||
|
Loading…
Reference in New Issue
Block a user