silence scary gcc warning

f41
Caolán McNamara 12 years ago
parent 3da55ecb4b
commit 5647779c28

@ -0,0 +1,37 @@
From 37a3f9638315483114380a461f60abeab7809a3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 18 Jul 2013 09:43:39 +0100
Subject: [PATCH] WaE: assuming signed overflow does not occur when assuming...
that (X + c) < X is always false [-Wstrict-overflow]
Change-Id: I63880bf27ab7e34eb9e0be682b39b80b71d65103
---
basebmp/source/bitmapdevice.cxx | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index fb08e32..00fc1c2 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -339,8 +339,15 @@ namespace
{
if( !mpDamage )
return;
- basegfx::B2IPoint aEnd( rDamagePoint.getX() + 1,
- rDamagePoint.getY() + 1 );
+
+ sal_Int32 nX(rDamagePoint.getX());
+ sal_Int32 nY(rDamagePoint.getY());
+ if (nX < SAL_MAX_INT32)
+ ++nX;
+ if (nY < SAL_MAX_INT32)
+ ++nY;
+
+ basegfx::B2IPoint aEnd( nX, nY );
damaged( basegfx::B2IBox( rDamagePoint, aEnd ) );
}
--
1.8.3.1

@ -43,7 +43,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.2 Version: %{libo_version}.2
Release: 4%{?libo_prerelease}%{?dist} Release: 5%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity Group: Applications/Productivity
URL: http://www.libreoffice.org/default/ URL: http://www.libreoffice.org/default/
@ -254,6 +254,7 @@ Patch17: 0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch
Patch18: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch Patch18: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch
Patch19: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch Patch19: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch
Patch20: 0001-rhbz-980387-fix-filter-selection-from-file-ext.patch Patch20: 0001-rhbz-980387-fix-filter-selection-from-file-ext.patch
Patch21: 0001-WaE-assuming-signed-overflow-does-not-occur-when-ass.patch
%define instdir %{_libdir} %define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice %define baseinstdir %{instdir}/libreoffice
@ -990,6 +991,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch18 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch %patch18 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch
%patch19 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch %patch19 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch
%patch20 -p1 -b .rhbz-980387-fix-filter-selection-from-file-ext.patch %patch20 -p1 -b .rhbz-980387-fix-filter-selection-from-file-ext.patch
%patch21 -p1 -b .WaE-assuming-signed-overflow-does-not-occur-when-ass.patch
# TODO: check this # TODO: check this
# these are horribly incomplete--empty translations and copied english # these are horribly incomplete--empty translations and copied english
@ -2077,6 +2079,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif %endif
%changelog %changelog
* Thu Jul 18 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.1.0.2-5
- silence scary gcc warning
* Tue Jul 16 2013 David Tardon <dtardon@redhat.com> - 1:4.1.0.2-4 * Tue Jul 16 2013 David Tardon <dtardon@redhat.com> - 1:4.1.0.2-4
- bump release - bump release

Loading…
Cancel
Save