diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-17 04:14:47 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-10-17 04:14:47 +0200 |
commit | efd341157c3cf738756afd77a91f37b735e9a2de (patch) | |
tree | 913ccc969a5011adc41dd61cf1d37b011c610b94 /forms | |
parent | 9d5e05edb20819e7b989f366fbd86ca4c2cd7cc5 (diff) |
MacOS X fixup to bogus WaE: 'bValue' may be used uninitialized
Change-Id: I1485e7f6b9147d4cec94833c0a2b35e730c397cf
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/CheckBox.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index 5db73971d693..d1667ea8a75f 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -211,6 +211,10 @@ bool OCheckBoxModel::DbUseBool() } //------------------------------------------------------------------------------ +#if defined __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif Any OCheckBoxModel::translateDbColumnToControlValue() { Any aValue; @@ -244,18 +248,16 @@ 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. -#if defined __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif + // Since the MacOS X compiler does not support #pragma GCC diagnostic + // within a function, moved them to outside the function. aValue <<= (sal_Int16)( bValue ? STATE_CHECK : STATE_NOCHECK ); -#if defined __GNUC__ -#pragma GCC diagnostic pop -#endif } return aValue; } +#if defined __GNUC__ +#pragma GCC diagnostic pop +#endif //----------------------------------------------------------------------------- sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) |