summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-19 10:53:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-19 10:53:27 +0100
commit8404dc3c76babbc9d0a165f4046a6e5e1be35fe5 (patch)
tree78c6c2a1efd230e1510adfaa50f4b43f12e80332 /sc
parent811d1f0a0428a293d829d2c3d90bf3e8bbe1be90 (diff)
-Werror=address (GCC 6)
"the compiler can assume that the address of ‘rItem’ will never be NULL" Change-Id: I90a8a3074c2dab427b4bc6345ec4a824eb2ac249
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/app/scmod.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 6fbbf926882b..162e355fd4e4 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -467,8 +467,9 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_PSZ_FUNCTION:
if (pReqArgs)
{
- const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(pReqArgs->Get(SID_PSZ_FUNCTION));
- OSL_ENSURE(dynamic_cast<const SfxUInt16Item*>( &rItem) != nullptr,"wrong Parameter");
+ auto const & p = pReqArgs->Get(SID_PSZ_FUNCTION);
+ OSL_ENSURE(dynamic_cast<const SfxUInt16Item*>(&p) != nullptr,"wrong Parameter");
+ const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(p);
ScAppOptions aNewOpts( GetAppOptions() );
aNewOpts.SetStatusFunc( rItem.GetValue() );