From fd4bfd505087b7cebd8626519aca9fbec17a1c1c Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Mon, 11 Jun 2018 20:44:23 +0530 Subject: [PATCH] build: Fix compiler warnings --- gdk/wayland/gdkdevice-wayland.c | 2 +- gdk/x11/xsettings-client.c | 5 +++-- modules/printbackends/gtkprintbackendfile.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 79e592750f..3ccc79c5a8 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -4097,7 +4097,7 @@ tablet_pad_group_handle_buttons (void *data, uint32_t *p; GDK_DISPLAY_NOTE (seat->display, EVENTS, - g_message ("tablet pad group handle buttons, pad group = %p, n_buttons = %ld", + g_message ("tablet pad group handle buttons, pad group = %p, n_buttons = %" G_GSIZE_FORMAT, wp_tablet_pad_group, buttons->size)); wl_array_for_each (p, buttons) diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c index 247e90e9f7..8c309c9227 100644 --- a/gdk/x11/xsettings-client.c +++ b/gdk/x11/xsettings-client.c @@ -138,7 +138,7 @@ notify_changes (GdkX11Screen *x11_screen, #define return_if_fail_bytes(buffer, n_bytes) G_STMT_START{ \ if (BYTES_LEFT (buffer) < (n_bytes)) \ { \ - g_warning ("Invalid XSETTINGS property (read off end: Expected %u bytes, only %ld left", \ + g_warning ("Invalid XSETTINGS property (read off end: Expected %u bytes, only %"G_GSIZE_FORMAT" left", \ (n_bytes), BYTES_LEFT (buffer)); \ return FALSE; \ } \ @@ -273,7 +273,8 @@ parse_settings (unsigned char *data, !fetch_card32 (&buffer, &n_entries)) goto out; - GDK_NOTE (SETTINGS, g_message ("reading %u settings (serial %u byte order %u)", n_entries, serial, buffer.byte_order)); + GDK_NOTE (SETTINGS, g_message ("reading %lu settings (serial %lu byte order %u)", + (unsigned long)n_entries, (unsigned long)serial, buffer.byte_order)); for (i = 0; i < n_entries; i++) { diff --git a/modules/printbackends/gtkprintbackendfile.c b/modules/printbackends/gtkprintbackendfile.c index b568e01395..64380de750 100644 --- a/modules/printbackends/gtkprintbackendfile.c +++ b/modules/printbackends/gtkprintbackendfile.c @@ -446,7 +446,7 @@ file_write (GIOChannel *source, } GTK_NOTE (PRINTING, - g_print ("FILE Backend: Writting %lu byte chunk to target file\n", bytes_read)); + g_print ("FILE Backend: Writting %"G_GSIZE_FORMAT" byte chunk to target file\n", bytes_read)); return TRUE; }