summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-19 10:53:27 +0100
committerDavid Tardon <dtardon@redhat.com>2016-04-26 19:33:42 +0000
commit52bfe2cffb71ee83bab4b56d3f950721f7104ca6 (patch)
treebbc38c15c31c21060980e81db67dbe344c21eb25 /sc
parentd0156986b0a4a3dc11e16a71637299d031cb30b5 (diff)
-Werror=address (GCC 6)
"the compiler can assume that the address of ‘rItem’ will never be NULL" Change-Id: I90a8a3074c2dab427b4bc6345ec4a824eb2ac249 (cherry picked from commit 8404dc3c76babbc9d0a165f4046a6e5e1be35fe5) Signed-off-by: David Tardon <dtardon@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/24411 Tested-by: Jenkins <ci@libreoffice.org>
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 8a376e7da751..9bdaacb4e1cd 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -471,8 +471,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() );