kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0001-WaE-Wstrict-overflow-assuming-signed-overflow-does-n.patch

2135ec
From ca576e0804324bbb36b697543cbe992e34d4b951 Mon Sep 17 00:00:00 2001
2135ec
From: Eike Rathke <erack@redhat.com>
2135ec
Date: Mon, 7 Oct 2013 21:51:26 +0200
2135ec
Subject: [PATCH] WaE [-Wstrict-overflow] assuming signed overflow does not
2135ec
 occur
2135ec
2135ec
... when assuming that (X - c) <= X is always true
2135ec
... or that (X + c) < X is always false
2135ec
2135ec
Change-Id: Ib2313827cd6358ced0141b41cba753896b676e28
2135ec
---
2135ec
 svtools/source/contnr/imivctl1.cxx | 4 ++--
2135ec
 1 file changed, 2 insertions(+), 2 deletions(-)
2135ec
2135ec
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
2135ec
index 1cd006b..0685bc3 100644
2135ec
--- a/svtools/source/contnr/imivctl1.cxx
2135ec
+++ b/svtools/source/contnr/imivctl1.cxx
2135ec
@@ -2710,9 +2710,9 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry
2135ec
     Rectangle aFocusRect( aBoundRect.Left(), aBmpRect.Top() - 1,
2135ec
                           aBoundRect.Right() - 4, aTextRect.Bottom() + 1 );
2135ec
     // the focus rectangle should not touch the text
2135ec
-    if( aFocusRect.Left() - 1 >= pEntry->aRect.Left() )
2135ec
+    if( aFocusRect.Left() > ::std::numeric_limits<long>::min() && aFocusRect.Left() - 1 >= pEntry->aRect.Left() )
2135ec
         aFocusRect.Left()--;
2135ec
-    if( aFocusRect.Right() + 1 <= pEntry->aRect.Right() )
2135ec
+    if( aFocusRect.Right() < ::std::numeric_limits<long>::max() && aFocusRect.Right() + 1 <= pEntry->aRect.Right() )
2135ec
         aFocusRect.Right()++;
2135ec
 
2135ec
     return aFocusRect;
2135ec
-- 
2135ec
1.8.3.1
2135ec