[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Tue Jan 19 02:50:16 PST 2016


 sw/source/core/text/txtfrm.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 59f190a5ac18a68a60d169e87fab9c335f488da0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 19 11:49:44 2016 +0100

    Silence some odd -Werror=strict-overflow (GCC 6)
    
    Change-Id: I7facae62c7ce0977e8c40d60720e4fe32460cd3d

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 0cc84d9..dc33a52 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -681,7 +681,15 @@ sal_Int32 SwTextFrame::FindBrk( const OUString &rText,
 
 bool SwTextFrame::IsIdxInside( const sal_Int32 nPos, const sal_Int32 nLen ) const
 {
+// Silence over-eager warning emitted at least by GCC trunk towards 6:
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
     if( nLen != COMPLETE_STRING && GetOfst() > nPos + nLen ) // the range preceded us
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
         return false;
 
     if( !GetFollow() ) // the range doesn't precede us,


More information about the Libreoffice-commits mailing list