From 849b02e4462d5c9695d4d61c4a5b8a87a3162fa1 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 16 Apr 2012 18:18:54 +0200 Subject: [PATCH] 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 . --- dbaccess/source/ui/dlg/advancedsettings.cxx | 5 +++-- 1 file 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 );