diff options
author | David Tardon <dtardon@redhat.com> | 2012-04-16 18:18:54 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-04-16 20:23:22 +0200 |
commit | 849b02e4462d5c9695d4d61c4a5b8a87a3162fa1 (patch) | |
tree | 5ddf6b342d79f355e0b64007fcd6dba061f5bbaa /dbaccess | |
parent | 6fbe6d281d5f61529084c6226cb4bf191849639a (diff) |
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 .
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/advancedsettings.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 0636ff0080c5..e2dc5c889c9d 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -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 ); |