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

Tor Lillqvist tml at collabora.com
Wed Oct 16 22:34:54 PDT 2013


 forms/source/component/CheckBox.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2337bb6b402391983f8f96a8d0bc9e904dd124a9
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Oct 17 08:25:28 2013 +0300

    WaE: unknown warning group '-Wmaybe-uninitialized'
    
    Seriously, would it be so awful to initialise the value even if strictly
    speaking it is unnecessary? Hopefully avoiding that is not an attempt at
    manual micro-optmisation? (Or did the initialisation actually cause some
    warning?)
    
    Besides, Clang is not just "the MacOS X compiler". I use Clang on Linux,
    too. It is great. Our Clang plug-in (which can be easily used only on Linux)
    is very useful.
    
    Change-Id: I379afed707d96745ee29979bd79467309adf0147

diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index d1667ea..4796729 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -211,7 +211,7 @@ bool OCheckBoxModel::DbUseBool()
 }
 
 //------------------------------------------------------------------------------
-#if defined __GNUC__
+#if defined __GNUC__ && ! defined __clang__
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #endif
@@ -248,14 +248,14 @@ Any OCheckBoxModel::translateDbColumnToControlValue()
         // Since above either bValue is initialised, either aValue.hasValue(),
         // bValue cannot be used uninitialised here.
         // But GCC does not see/understand that, which breaks -Werror builds.
-        // Since the MacOS X compiler does not support #pragma GCC diagnostic
+        // And Clang compiler does not support #pragma GCC diagnostic
         // within a function, moved them to outside the function.
         aValue <<= (sal_Int16)( bValue ? STATE_CHECK : STATE_NOCHECK );
     }
 
     return aValue;
 }
-#if defined __GNUC__
+#if defined __GNUC__ && ! defined __clang__
 #pragma GCC diagnostic pop
 #endif
 


More information about the Libreoffice-commits mailing list