Kaydet (Commit) 849b02e4 authored tarafından David Tardon's avatar David Tardon

mingw: avoid weird build error and -Werror

The error message is:
"'*((void*)& aValue +1)' may be used uninitialized in this function"

using gcc 4.7.0 in gnu++11 mode and boost 1.48.0 .
üst 6fbe6d28
...@@ -300,7 +300,8 @@ namespace dbaui ...@@ -300,7 +300,8 @@ namespace dbaui
if ( !*setting->ppControl ) if ( !*setting->ppControl )
continue; continue;
::boost::optional< bool > aValue; ::boost::optional< bool > aValue(false);
aValue.reset();
SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, sal_True ); SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, sal_True );
if ( pItem->ISA( SfxBoolItem ) ) if ( pItem->ISA( SfxBoolItem ) )
...@@ -320,7 +321,7 @@ namespace dbaui ...@@ -320,7 +321,7 @@ namespace dbaui
} }
else else
{ {
sal_Bool bValue = *aValue; bool bValue = *aValue;
if ( setting->bInvertedDisplay ) if ( setting->bInvertedDisplay )
bValue = !bValue; bValue = !bValue;
(*setting->ppControl)->Check( bValue ); (*setting->ppControl)->Check( bValue );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment