[gimp] get rid of strict overflow warning

Nils Philippsen nphilipp at fedoraproject.org
Wed Mar 6 14:43:50 UTC 2013


commit f63ee8a6cb035c6a3a06f80f402dd0afef36764a
Author: Nils Philippsen <nils at redhat.com>
Date:   Wed Mar 6 15:32:25 2013 +0100

    get rid of strict overflow warning

 gimp-2.8.4-strict-overflow-warning.patch |   40 ++++++++++++++++++++++++++++++
 gimp.spec                                |    7 +++++
 2 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/gimp-2.8.4-strict-overflow-warning.patch b/gimp-2.8.4-strict-overflow-warning.patch
new file mode 100644
index 0000000..e99a129
--- /dev/null
+++ b/gimp-2.8.4-strict-overflow-warning.patch
@@ -0,0 +1,40 @@
+From bf1727f2eb3778c35d8a742f7d88866fd9a9cb55 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils at redhat.com>
+Date: Wed, 6 Mar 2013 15:27:58 +0100
+Subject: [PATCH] patch: strict-overflow-warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Squashed commit of the following:
+
+commit f059fde47f4ae7d642d9a256b9b07297ad9aabd2
+Author: Nils Philippsen <nils at redhat.com>
+Date:   Wed Mar 6 12:16:43 2013 +0100
+
+    fix bogus overflow warning
+
+    tile-swap.c: In function ‘tile_swap_command’:
+    tile-swap.c:721:6: warning: assuming signed overflow does not occur when
+    assuming that (X + c) < X is always false [-Wstrict-overflow]
+    (cherry picked from commit bc610c8fbd61e9574a2c378829b6ab91047d61b7)
+---
+ app/base/tile-swap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/app/base/tile-swap.c b/app/base/tile-swap.c
+index b65526e..ecc7dc1 100644
+--- a/app/base/tile-swap.c
++++ b/app/base/tile-swap.c
+@@ -110,7 +110,7 @@ static void          tile_swap_gap_destroy    (SwapFileGap *gap);
+ 
+ static SwapFile     * gimp_swap_file   = NULL;
+ 
+-static const gint64   swap_file_grow   = 1024 * TILE_WIDTH * TILE_HEIGHT * 4;
++static const guint64  swap_file_grow   = 1024 * TILE_WIDTH * TILE_HEIGHT * 4;
+ 
+ static gboolean       seek_err_msg     = TRUE;
+ static gboolean       read_err_msg     = TRUE;
+-- 
+1.8.1.4
+
diff --git a/gimp.spec b/gimp.spec
index 7640d9f..8b010a7 100644
--- a/gimp.spec
+++ b/gimp.spec
@@ -203,6 +203,9 @@ Patch0:         gimp-%{version}%{dashprerel}-git%{gitrev}.patch.bz2
 # Try using the system monitor profile for color management by default.
 # Fedora specific.
 Patch1:         gimp-2.8.2-cm-system-monitor-profile-by-default.patch
+# Don't trip strict overflow warning.
+# Upstream commit bc610c8fbd61e9574a2c378829b6ab91047d61b7.
+Patch2:         gimp-2.8.4-strict-overflow-warning.patch
 
 %description
 GIMP (GNU Image Manipulation Program) is a powerful image composition and
@@ -289,6 +292,7 @@ EOF
 %endif
 
 %patch1 -p1 -b .cm-system-monitor-profile-by-default
+%patch2 -p1 -b .strict-overflow-warning
 
 %build
 %if %{with hardening}
@@ -583,6 +587,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %endif
 
 %changelog
+* Wed Mar 06 2013 Nils Philippsen <nils at redhat.com>
+- get rid of strict overflow warning
+
 * Wed Feb 06 2013 Nils Philippsen <nils at redhat.com> - 2:2.8.4-1
 - version 2.8.4
 


More information about the scm-commits mailing list