mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
gio: Add some casts for printf() formatting statbufs on Solaris
Apparently Solaris defines statbuf fields as long when Linux doesn’t, in some cases. Cast down to the type expected by the printf() format placeholder. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=749652
This commit is contained in:
parent
ae7895002b
commit
e644bfa37e
@ -273,7 +273,7 @@ ensure_keyring_directory (GError **error)
|
||||
G_IO_ERROR_FAILED,
|
||||
_("Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"),
|
||||
path,
|
||||
statbuf.st_mode & 0777);
|
||||
(guint) (statbuf.st_mode & 0777));
|
||||
g_free (path);
|
||||
path = NULL;
|
||||
goto out;
|
||||
|
@ -3481,10 +3481,10 @@ g_dbus_message_print (GDBusMessage *message,
|
||||
{
|
||||
#ifndef MAJOR_MINOR_NOT_FOUND
|
||||
g_string_append_printf (fs, "%s" "dev=%d:%d", fs->len > 0 ? "," : "",
|
||||
major (statbuf.st_dev), minor (statbuf.st_dev));
|
||||
(gint) major (statbuf.st_dev), (gint) minor (statbuf.st_dev));
|
||||
#endif
|
||||
g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "",
|
||||
statbuf.st_mode);
|
||||
(guint) statbuf.st_mode);
|
||||
g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
|
||||
(guint64) statbuf.st_ino);
|
||||
g_string_append_printf (fs, "%s" "uid=%u", fs->len > 0 ? "," : "",
|
||||
@ -3493,7 +3493,7 @@ g_dbus_message_print (GDBusMessage *message,
|
||||
(guint) statbuf.st_gid);
|
||||
#ifndef MAJOR_MINOR_NOT_FOUND
|
||||
g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "",
|
||||
major (statbuf.st_rdev), minor (statbuf.st_rdev));
|
||||
(gint) major (statbuf.st_rdev), (gint) minor (statbuf.st_rdev));
|
||||
#endif
|
||||
g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
|
||||
(guint64) statbuf.st_size);
|
||||
|
Loading…
Reference in New Issue
Block a user