Blob Blame History Raw
From eddba1d6138b2f9542dd7f1f4e08a2ac0f35c21a Mon Sep 17 00:00:00 2001
From: Kalev Lember <kalevlember@gmail.com>
Date: Sun, 2 Jun 2013 10:35:39 +0200
Subject: [PATCH] Fix -Wformat compiler warnings

These were treated as errors with gcc 4.8 because of the use of -Werror.

https://bugzilla.gnome.org/show_bug.cgi?id=701457
---
 src/disks/gducreatediskimagedialog.c  | 2 +-
 src/disks/gdurestorediskimagedialog.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/disks/gducreatediskimagedialog.c b/src/disks/gducreatediskimagedialog.c
index 2817a89..8d1e092 100644
--- a/src/disks/gducreatediskimagedialog.c
+++ b/src/disks/gducreatediskimagedialog.c
@@ -610,7 +610,7 @@ copy_span (int              fd,
                                   error))
     {
       g_prefix_error (error,
-                      "Error writing %" G_GUINT64_FORMAT " bytes to offset %" G_GUINT64_FORMAT ": ",
+                      "Error writing %" G_GSIZE_FORMAT " bytes to offset %" G_GUINT64_FORMAT ": ",
                       num_bytes_to_write,
                       offset);
       goto out;
diff --git a/src/disks/gdurestorediskimagedialog.c b/src/disks/gdurestorediskimagedialog.c
index abfc4f5..09171e4 100644
--- a/src/disks/gdurestorediskimagedialog.c
+++ b/src/disks/gdurestorediskimagedialog.c
@@ -587,7 +587,7 @@ copy_thread_func (gpointer user_data)
                                     &error))
         {
           g_prefix_error (&error,
-                          "Error reading %" G_GUINT64_FORMAT " bytes from offset %" G_GUINT64_FORMAT ": ",
+                          "Error reading %" G_GSIZE_FORMAT " bytes from offset %" G_GUINT64_FORMAT ": ",
                           num_bytes_to_read,
                           num_bytes_completed);
           goto out;
@@ -595,7 +595,7 @@ copy_thread_func (gpointer user_data)
       if (num_bytes_read != num_bytes_to_read)
         {
           g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "Requested %" G_GUINT64_FORMAT " bytes from offset %" G_GUINT64_FORMAT " but only read %" G_GUINT64_FORMAT " bytes",
+                       "Requested %" G_GSIZE_FORMAT " bytes from offset %" G_GUINT64_FORMAT " but only read %" G_GSIZE_FORMAT " bytes",
                        num_bytes_read,
                        num_bytes_completed,
                        num_bytes_to_read);
@@ -610,13 +610,13 @@ copy_thread_func (gpointer user_data)
             goto copy_write_again;
 
           g_set_error (&error, G_IO_ERROR, G_IO_ERROR_FAILED,
-                       "Error writing %" G_GUINT64_FORMAT " bytes to offset %" G_GUINT64_FORMAT ": %m",
+                       "Error writing %" G_GSIZE_FORMAT " bytes to offset %" G_GUINT64_FORMAT ": %m",
                        num_bytes_read,
                        num_bytes_completed);
           goto out;
         }
 
-      /*g_print ("copied %" G_GUINT64_FORMAT " bytes at offset %" G_GUINT64_FORMAT "\n",
+      /*g_print ("copied %" G_GSIZE_FORMAT " bytes at offset %" G_GUINT64_FORMAT "\n",
                (guint64) num_bytes_written,
                num_bytes_completed);*/
 
-- 
1.8.2.1