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 .
This commit is contained in:
David Tardon 2012-04-16 18:18:54 +02:00
parent 6fbe6d281d
commit 849b02e446

View file

@ -300,7 +300,8 @@ namespace dbaui
if ( !*setting->ppControl )
continue;
::boost::optional< bool > aValue;
::boost::optional< bool > aValue(false);
aValue.reset();
SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, sal_True );
if ( pItem->ISA( SfxBoolItem ) )
@ -320,7 +321,7 @@ namespace dbaui
}
else
{
sal_Bool bValue = *aValue;
bool bValue = *aValue;
if ( setting->bInvertedDisplay )
bValue = !bValue;
(*setting->ppControl)->Check( bValue );