[Libreoffice-commits] core.git: include/basegfx

Stephan Bergmann sbergman at redhat.com
Thu Jan 15 03:29:46 PST 2015


 include/basegfx/range/basicrange.hxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 897c8af7948aae8f3e3014f9f23846ef1ca5c6cd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jan 15 12:29:14 2015 +0100

    Silence bogus GCC 4.9 -Werror=strict-overflow
    
    Change-Id: Ie116cee9282b3cc73e3bbb9b3fbaa50b1e8e974a

diff --git a/include/basegfx/range/basicrange.hxx b/include/basegfx/range/basicrange.hxx
index 87fb5ba..bea40dd 100644
--- a/include/basegfx/range/basicrange.hxx
+++ b/include/basegfx/range/basicrange.hxx
@@ -158,7 +158,16 @@ namespace basegfx
             }
             else
             {
+// Silence over-eager warning emitted at least by GCC 4.9.2 in certain
+// instantiations:
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#endif
                 if(nValue < mnMinimum)
+#if defined __GNUC__ && !defined __clang__
+#pragma GCC diagnostic pop
+#endif
                 {
                     mnMinimum = nValue;
                 }


More information about the Libreoffice-commits mailing list