Add a patch to fix -Wformat errors
https://bugzilla.gnome.org/show_bug.cgi?id=701457
This commit is contained in:
parent
e88b2a9926
commit
1435615738
67
gnome-disk-utility-3.8.2-format.patch
Normal file
67
gnome-disk-utility-3.8.2-format.patch
Normal file
@ -0,0 +1,67 @@
|
||||
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
|
||||
|
@ -16,6 +16,8 @@ License: GPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://git.gnome.org/browse/gnome-disk-utility
|
||||
Source0: http://download.gnome.org/sources/gnome-disk-utility/3.8/%{name}-%{version}.tar.xz
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=701457
|
||||
Patch0: gnome-disk-utility-3.8.2-format.patch
|
||||
|
||||
BuildRequires: glib2-devel >= %{glib2_version}
|
||||
BuildRequires: gtk3-devel >= %{gtk3_version}
|
||||
@ -59,6 +61,7 @@ fstab/crypttab editing, ATA SMART and other features
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .format
|
||||
|
||||
%build
|
||||
%if 0%{?enable_autoreconf}
|
||||
|
Loading…
Reference in New Issue
Block a user