From 51ca7709577625c7b823468f5b337d18ce229bd0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mar 25 2014 11:22:23 +0000 Subject: Fix a -Werror=format-security build failure --- diff --git a/0001-Fix-a-gcc-Wformat-security-warning.patch b/0001-Fix-a-gcc-Wformat-security-warning.patch new file mode 100644 index 0000000..77dfb53 --- /dev/null +++ b/0001-Fix-a-gcc-Wformat-security-warning.patch @@ -0,0 +1,29 @@ +From ade333ad8989e8489ca281b3f2481695ee9e788a Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 25 Mar 2014 11:35:15 +0100 +Subject: [PATCH] Fix a gcc -Wformat-security warning + +This fixes the 32 bit build on distros that use -Werror=format-security. + +https://bugzilla.gnome.org/show_bug.cgi?id=727014 +--- + src/glade-http.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/glade-http.c b/src/glade-http.c +index ebd217f..3a29b4e 100644 +--- a/src/glade-http.c ++++ b/src/glade-http.c +@@ -185,7 +185,8 @@ on_write_ready (GObject *source, GAsyncResult *res, gpointer data) + + if (priv->data->len != count) + { +- g_warning ("priv->data_size = %ld, write = %ld", priv->data->len, count); ++ g_warning ("priv->data_size = %" G_GSIZE_FORMAT ", write = %" G_GSIZE_FORMAT, ++ priv->data->len, count); + return; + } + +-- +1.9.0 + diff --git a/glade.spec b/glade.spec index d2023ac..f72f17a 100644 --- a/glade.spec +++ b/glade.spec @@ -10,6 +10,7 @@ Summary: User Interface Designer for GTK+ License: GPLv2+ and LGPLv2+ URL: http://glade.gnome.org/ Source0: http://ftp.gnome.org/pub/GNOME/sources/glade/3.18/glade-%{version}.tar.xz +Patch0: 0001-Fix-a-gcc-Wformat-security-warning.patch BuildRequires: chrpath BuildRequires: desktop-file-utils @@ -60,6 +61,7 @@ developing applications that use Glade widget library. %prep %setup -q +%patch0 -p1 -b .format_security %build