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:
Emmanuel Fleury 2020-11-17 21:36:09 +01:00
parent 4260193cff
commit f598a93332
2 changed files with 2 additions and 1 deletions

View File

@ -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;
} }

View File

@ -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;