diff options
author | Eike Rathke <erack@redhat.com> | 2013-10-07 21:51:26 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-14 10:55:46 +0000 |
commit | 2d4814ca36e52da3681fb369277243ae193085cc (patch) | |
tree | 0626f844d5aa4948531febcde8b0adf0647a19c6 | |
parent | 991632a54ec6dcc5390f276bdb453c8fa966a15b (diff) |
WaE [-Wstrict-overflow] assuming signed overflow does not occur
... when assuming that (X - c) <= X is always true
... or that (X + c) < X is always false
Change-Id: Ib2313827cd6358ced0141b41cba753896b676e28
(cherry picked from commit ca576e0804324bbb36b697543cbe992e34d4b951)
Reviewed-on: https://gerrit.libreoffice.org/6159
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit 5e259fb8bb36d287e8986cf0c9695bcb75b9e70c)
Reviewed-on: https://gerrit.libreoffice.org/6222
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index f363a0faa7d5..9d5478dc1504 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -2710,9 +2710,9 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcFocusRect( SvxIconChoiceCtrlEntry* pEntry Rectangle aFocusRect( aBoundRect.Left(), aBmpRect.Top() - 1, aBoundRect.Right() - 4, aTextRect.Bottom() + 1 ); // the focus rectangle should not touch the text - if( aFocusRect.Left() - 1 >= pEntry->aRect.Left() ) + if( aFocusRect.Left() > ::std::numeric_limits<long>::min() && aFocusRect.Left() - 1 >= pEntry->aRect.Left() ) aFocusRect.Left()--; - if( aFocusRect.Right() + 1 <= pEntry->aRect.Right() ) + if( aFocusRect.Right() < ::std::numeric_limits<long>::max() && aFocusRect.Right() + 1 <= pEntry->aRect.Right() ) aFocusRect.Right()++; return aFocusRect; |