basctl/source/basicide/baside2.cxx                                |    1 
 chart2/source/controller/drawinglayer/ViewElementListProvider.cxx |    4 
 chart2/source/model/template/NetChartTypeTemplate.cxx             |    3 
 compilerplugins/clang/unusedvariableplus.cxx                      |   45 
++++++----
 connectivity/source/parse/sqliterator.cxx                         |    1 
 cui/source/dialogs/toolbarmodedlg.cxx                             |    8 -
 dbaccess/source/ui/control/sqledit.cxx                            |    1 
 extensions/source/bibliography/general.cxx                        |    3 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx           |    1 
 framework/source/loadenv/loadenv.cxx                              |    6 -
 oox/source/drawingml/shape.cxx                                    |    1 
 oox/source/ppt/slidepersist.cxx                                   |    1 
 sc/source/ui/vba/vbarange.cxx                                     |    1 
 sfx2/source/view/viewfrm.cxx                                      |    2 
 starmath/source/view.cxx                                          |    1 
 svx/source/core/graphichelper.cxx                                 |    1 
 sw/source/core/docnode/section.cxx                                |    1 
 ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx                  |    7 -
 vcl/source/bitmap/bitmap.cxx                                      |    1 
 vcl/source/gdi/impglyphitem.cxx                                   |    3 
 vcl/source/window/winproc.cxx                                     |    3 
 vcl/unx/gtk3/gtkframe.cxx                                         |    2 
 xmlsecurity/source/helper/xsecctl.cxx                             |    1 
 23 files changed, 30 insertions(+), 68 deletions(-)

New commits:
commit 9e57e164844e67faaf2b0424181c2df29e871992
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu May 5 09:59:06 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu May 5 17:35:08 2022 +0200

    loplugin:unusedvariableplus
    
    Change-Id: Id93086be1224b6f6bf0bdaa1d50b4f289099027e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133876
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index eecf917d6035..215ed0be3393 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -459,7 +459,6 @@ void ModulWindow::LoadBasic()
 
 void ModulWindow::SaveBasicSource()
 {
-    Reference< uno::XComponentContext > xContext( 
::comphelper::getProcessComponentContext() );
     sfx2::FileDialogHelper 
aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD,
                                 FileDialogFlags::NONE, this->GetFrameWeld());
     aDlg.SetContext(sfx2::FileDialogHelper::BasicExportSource);
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx 
b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 77099c9444fe..ef7eba88eb65 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -110,10 +110,6 @@ SdrObjList* ViewElementListProvider::GetSymbolList() const
     {
         //@todo use mutex
 
-        //get shape factory
-        uno::Reference<lang::XMultiServiceFactory> xShapeFactory(
-            m_pDrawModelWrapper->getShapeFactory());
-
         //get hidden draw page (target):
         rtl::Reference<SvxDrawPage> xTarget = 
m_pDrawModelWrapper->getHiddenDrawPage();
 
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx 
b/chart2/source/model/template/NetChartTypeTemplate.cxx
index 5632ac648f07..7f120315bead 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -88,9 +88,6 @@ bool NetChartTypeTemplate::matchesTemplate(
 {
     bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, 
bAdaptProperties );
 
-    rtl::Reference< ChartType > xChartType =
-        DiagramHelper::getChartTypeByIndex( xDiagram, 0 );
-
     if( bResult )
     {
         //filled net chart?:
diff --git a/compilerplugins/clang/unusedvariableplus.cxx 
b/compilerplugins/clang/unusedvariableplus.cxx
index af33ad9d2223..e8a8385bb3cd 100644
--- a/compilerplugins/clang/unusedvariableplus.cxx
+++ b/compilerplugins/clang/unusedvariableplus.cxx
@@ -107,6 +107,8 @@ public:
             return true;
         if (var->isExceptionVariable()) // not interesting
             return true;
+        if (isa<DecompositionDecl>(var))
+            return true;
 
         auto type = var->getType().getCanonicalType().getUnqualifiedType();
         auto typeName = type.getAsString();
@@ -125,10 +127,10 @@ public:
             "BoolResetter",
             "boost::io::basic_ios_all_saver<char, struct 
std::char_traits<char> >",
             "BorderLinesGuard",
+            "BorderTest",
             "BroadcastRecalcOnRefMoveGuard",
             "CacheLockGuard",
             "cc_reset",
-            "ViewCallback",
             "chart::ControllerLockGuard",
             "chart::ControllerLockGuardUNO",
             "chart::HiddenUndoContext",
@@ -173,6 +175,7 @@ public:
             "dbaxml::(anonymous namespace)::FocusWindowWaitGuard",
             "DBG_Model",
             "DeactivateUpdateMode",
+            "DepthProtect",
             "desktop::Desktop",
             "desktop::(anonymous namespace)::ConditionSetGuard",
             "desktop::(anonymous namespace)::RefClearGuard<class "
@@ -184,6 +187,7 @@ public:
             "DisableCallbacks",
             "DisableGetPivotData",
             "DispatchMutexLock_Impl",
+            "DisplayLockGuard",
             "DocTemplLocker_Impl",
             "DocumentSettingsGuard",
             "DocxTableExportContext",
@@ -223,11 +227,13 @@ public:
             "HelpParser",
             "HtmlExport",
             "HTMLSaveData",
+            "http_dav_ucp::CurlUri",
             "IMapCompat",
             "jni_uno::JLocalAutoRef",
             "LoadMediumGuard",
             "LockGuard",
             "MacroInterpretIncrementer",
+            "MakeAllOutlineContentTemporarilyVisible",
             "MailMergeExecuteFinalizer",
             "ModifyBlocker_Impl",
             "MutexRelease",
@@ -255,8 +261,8 @@ public:
             "rptui::OXUndoEnvironment::OUndoEnvLock",
             "PaMIntoCursorShellRing",
             "ParserCleanup",
-            "BorderTest",
             "pcr::ComposedUIAutoFireGuard",
+            "PngDestructor",
             "writerperfect::(anonymous namespace)::PositionHolder",
             "pq_sdbc_driver::DisposeGuard",
             "PropertyChangeNotifier",
@@ -276,6 +282,7 @@ public:
             "SaveRunState",
             "SbiExpression",
             "sc::AutoCalcSwitch",
+            "sc::DelayDeletingBroadcasters",
             "sc::DelayFormulaGroupingSwitch",
             "sc::IdleSwitch",
             "sc::UndoSwitch",
@@ -317,7 +324,9 @@ public:
             "sd::ModifyGuard",
             "sd::OutlineViewModelChangeGuard",
             "setFastDocumentHandlerGuard",
+            "SmMathConfig::CommitLocker",
             "SfxErrorContext",
+            "SfxFilterListener",
             "SfxObjectShellLock",
             "SfxProgress",
             "SfxSaveGuard",
@@ -327,20 +336,18 @@ public:
             "SolarMutexGuard",
             "SolarMutexReleaser",
             "StackHack",
+            "std::lock_guard<class std::mutex>",
             "std::scoped_lock<class std::mutex>",
-            "std::unique_ptr<class com::sun::star::uno::ContextLayer, struct "
-            "std::default_delete<class com::sun::star::uno::ContextLayer> >",
-            "std::unique_ptr<class weld::WaitObject, struct 
std::default_delete<class "
-            "weld::WaitObject> >",
+            "std::unique_lock<class std::mutex>",
+            "std::unique_lock<class std::recursive_mutex>",
+            "std::unique_ptr<class com::sun::star::uno::ContextLayer>",
+            "std::unique_ptr<class weld::WaitObject>",
             "std::unique_ptr<class ClearableClipRegion, struct 
o3tl::default_delete<class "
-            "ClearableClipRegion> >",
-            "std::unique_ptr<class SwDocShell::LockAllViewsGuard, struct "
-            "std::default_delete<class "
-            "SwDocShell::LockAllViewsGuard> >",
-            "std::unique_ptr<class SwSaveFootnoteHeight, struct 
std::default_delete<class "
-            "SwSaveFootnoteHeight> >",
-            "std::unique_ptr<class SwModelTestBase::Resetter, struct 
std::default_delete<class "
-            "SwModelTestBase::Resetter> >",
+            "ClearableClipRegion>>",
+            "std::unique_ptr<class SfxObjectShell::LockAllViewsGuard>",
+            "std::unique_ptr<class SwDocShell::LockAllViewsGuard>",
+            "std::unique_ptr<class SwSaveFootnoteHeight>",
+            "std::unique_ptr<class SwModelTestBase::Resetter>",
             "StreamExceptionsEnabler",
             "SvAddressParser_Impl",
             "svl::undo::impl::LockGuard",
@@ -349,8 +356,9 @@ public:
             "SvXMLElementExport",
             "svxform::(anonymous namespace)::QuitGuard",
             "sw::DrawUndoGuard",
-            "sw::UndoGuard",
+            "sw::FlyCreationSuppressor",
             "sw::GroupUndoGuard",
+            "sw::UndoGuard",
             "sw::(anonymous namespace)::CursorGuard",
             "SwActContext",
             "SwAutoFormat",
@@ -371,8 +379,7 @@ public:
             "SwFootnoteSave",
             "SwFrameDeleteGuard",
             "SwModelTestBase::Resetter",
-            "std::unique_ptr<class ScTokenArray, struct 
std::default_delete<class "
-            "ScTokenArray> >", // ScCompiler::CompileString has nasty semantics
+            "std::unique_ptr<class ScTokenArray>", // 
ScCompiler::CompileString has nasty semantics
             "Resetter",
             "SwFrameSwapper",
             "SwFlyNotify",
@@ -415,6 +422,9 @@ public:
             "TimerTriggeredControllerLock",
             "ToggleSaveToModule",
             "toolkit::(anonymous namespace)::ResetFlagOnExit",
+            "tools::ScopedJsonWriterArray",
+            "tools::ScopedJsonWriterNode",
+            "tools::ScopedJsonWriterStruct",
             "TravelSuspension",
             "TreeUpdateSwitch",
             "rptui::UndoContext",
@@ -435,6 +445,7 @@ public:
             "VerbExecutionControllerGuard",
             "VersionCompatRead",
             "VersionCompatWrite",
+            "ViewCallback",
             "SlideShowImpl::WaitSymbolLock",
             "weld::WaitObject",
             "writerfilter::ooxml::(anonymous namespace)::StatusIndicatorGuard",
diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index 1ce49b5ff95d..83d6342fa84b 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -823,7 +823,6 @@ void OSQLParseTreeIterator::traverseCreateColumns(const 
OSQLParseNode* pSelectNo
                 pColumn->setFunction(false);
                 pColumn->setRealName(aColumnName);
 
-                Reference< XPropertySet> xCol = pColumn;
                 m_aCreateColumns->push_back(pColumn);
             }
         }
diff --git a/cui/source/dialogs/toolbarmodedlg.cxx 
b/cui/source/dialogs/toolbarmodedlg.cxx
index 5ca568adf576..f1dbdeb106cb 100644
--- a/cui/source/dialogs/toolbarmodedlg.cxx
+++ b/cui/source/dialogs/toolbarmodedlg.cxx
@@ -67,11 +67,9 @@ static OUString GetCurrentApp()
 static OUString GetCurrentMode()
 {
     OUString sResult;
-    if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
+    if (SfxViewFrame::Current())
     {
-        const auto xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface();
         const auto xContext = comphelper::getProcessComponentContext();
-        const auto xModuleManager = 
css::frame::ModuleManager::create(xContext);
         const utl::OConfigurationTreeRoot aAppNode(
             xContext, "org.openoffice.Office.UI.ToolbarMode/Applications/" + 
GetCurrentApp(), true);
         if (aAppNode.isValid())
@@ -189,11 +187,9 @@ IMPL_LINK(ToolbarmodeDialog, OnApplyClick, weld::Button&, 
rButton, void)
         aBatch->commit();
 
         OUString sCurrentApp = GetCurrentApp();
-        if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
+        if (SfxViewFrame::Current())
         {
-            const auto xCurrentFrame = 
pViewFrame->GetFrame().GetFrameInterface();
             const auto xContext = comphelper::getProcessComponentContext();
-            const auto xModuleManager = 
css::frame::ModuleManager::create(xContext);
             const utl::OConfigurationTreeRoot aAppNode(
                 xContext, 
"org.openoffice.Office.UI.ToolbarMode/Applications/", true);
             if (sCurrentApp != "Writer")
diff --git a/dbaccess/source/ui/control/sqledit.cxx 
b/dbaccess/source/ui/control/sqledit.cxx
index 5ebb87152684..49758289e092 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -86,7 +86,6 @@ void SQLEditView::DisableInternalUndo()
 
 void SQLEditView::SetItemPoolFont(SfxItemPool* pItemPool)
 {
-    StyleSettings aStyleSettings = 
Application::GetSettings().GetStyleSettings();
     OUString 
sFontName(officecfg::Office::Common::Font::SourceViewFont::FontName::get().value_or(OUString()));
     if (sFontName.isEmpty())
     {
diff --git a/extensions/source/bibliography/general.cxx 
b/extensions/source/bibliography/general.cxx
index acf29ea4e1c6..fc429b4adf62 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -782,7 +782,6 @@ bool BibGeneralPage::AddXControl(const OUString& rName, 
weld::Entry& rEntry)
 
             if( xPropSet.is())
             {
-                uno::Reference< beans::XPropertySetInfo >  xPropInfo = 
xPropSet->getPropertySetInfo();
                 maChangeListeners.emplace_back(new EntryChangeListener(rEntry, 
xPropSet, *this));
                 maChangeListeners.back()->start();
                 if (&rEntry == m_xLocalURLED.get())
@@ -849,8 +848,6 @@ bool BibGeneralPage::AddXControl(const OUString& rName, 
weld::ComboBox& rList)
 
             if( xPropSet.is())
             {
-                uno::Reference< beans::XPropertySetInfo >  xPropInfo = 
xPropSet->getPropertySetInfo();
-
                 css::uno::Sequence<OUString> aEntries;
                 xPropSet->getPropertyValue("StringItemList") >>= aEntries;
                 for (const OUString& rString : std::as_const(aEntries))
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 7161a7a26565..20cee3f38394 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -3234,7 +3234,6 @@ void SAL_CALL ToolbarLayoutManager::startDocking( const 
awt::DockingEvent& e )
     bool bWinFound( false );
 
     SolarMutexClearableGuard aReadGuard;
-    uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow );
     uno::Reference< awt::XWindow2 > xWindow( e.Source, uno::UNO_QUERY );
     aReadGuard.clear();
 
diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index ac9bf5c191b9..c0cd7666813f 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1686,12 +1686,6 @@ void LoadEnv::impl_reactForLoadingState()
 void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< 
css::awt::XWindow >& xWindow      ,
                                                 bool bForceToFront)
 {
-    // SAFE -> ----------------------------------
-    osl::ClearableMutexGuard aReadLock(m_mutex);
-    css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
-    aReadLock.clear();
-    // <- SAFE ----------------------------------
-
     SolarMutexGuard aSolarGuard;
     VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow);
     if ( !pWindow )
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 4b0eafe97fee..3951fdc8e7df 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1036,7 +1036,6 @@ Reference< XShape > const & Shape::createAndInsert(
         sal_Int32 i, nNumPoints = aPoly.count();
         uno::Sequence< awt::Point > aPointSequence( nNumPoints );
         awt::Point* pPoints = aPointSequence.getArray();
-        uno::Reference<lang::XServiceInfo> xModelInfo(rFilterBase.getModel(), 
uno::UNO_QUERY);
         for( i = 0; i < nNumPoints; ++i )
         {
             basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) );
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index bd7f32b5ef14..81a0fd7991a7 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -364,7 +364,6 @@ void SlidePersist::createConnectorShapeConnection()
                 if (pShape == maShapeMap.end())
                     continue;
                 uno::Reference<drawing::XShape> 
xShape(pShape->second->getXShape(), uno::UNO_QUERY);
-                uno::Reference<beans::XPropertySet> xSet(xShape, 
uno::UNO_QUERY);
                 if (xShape.is())
                 {
                     uno::Reference<drawing::XGluePointsSupplier> 
xSupplier(xShape, uno::UNO_QUERY);
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 4e1ff71a6ceb..6774d8361f61 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2543,7 +2543,6 @@ ScVbaRange::Copy(const ::uno::Any& Destination)
     }
     else
     {
-        uno::Reference<frame::XModel> xModel = getModelFromRange(mxRange);
         Select();
         excel::implnCopy(getUnoModel());
     }
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 88d9d269b5f3..b43a9076ed48 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3143,7 +3143,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
 
                 case SID_RECORDMACRO :
                 {
-                    SvtMiscOptions aMiscOptions;
                     const OUString& 
sName{GetObjectShell()->GetFactory().GetFactoryName()};
                     bool bMacrosDisabled = 
officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get();
                     if (bMacrosDisabled ||
@@ -3170,7 +3169,6 @@ void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
 
                 case SID_STOP_RECORDING :
                 {
-                    SvtMiscOptions aMiscOptions;
                     const OUString& 
sName{GetObjectShell()->GetFactory().GetFactoryName()};
                     if ( 
!officecfg::Office::Common::Misc::MacroRecorderMode::get() ||
                          ( sName!="swriter" && sName!="scalc" ) )
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 360c96390f95..e87b27ccb958 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -358,7 +358,6 @@ bool SmGraphicWidget::MouseButtonDown(const MouseEvent& 
rMEvt)
     SmEditWindow* pEdit = mrViewShell.GetEditWindow();
     if (!pEdit)
         return true;
-    const SmToken  aToken (pNode->GetToken());
 
     // set selection to the beginning of the token
     pEdit->SetSelection(pNode->GetSelection());
diff --git a/svx/source/core/graphichelper.cxx 
b/svx/source/core/graphichelper.cxx
index d297e101fa20..853be47d3c7e 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -430,7 +430,6 @@ void GraphicHelper::SaveShapeAsGraphic(weld::Window* 
pParent,
 {
     try
     {
-        Reference< XComponentContext > xContext( 
::comphelper::getProcessComponentContext() );
         Reference< XPropertySet > xShapeSet( xShape, UNO_QUERY_THROW );
 
         FileDialogHelper 
aDialogHelper(TemplateDescription::FILESAVE_AUTOEXTENSION, 
FileDialogFlags::NONE, pParent);
diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index b76b3ddeac3d..c35a614f8851 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -903,7 +903,6 @@ void SwSectionFormat::UpdateParent()
         pEditInReadonly = &pPS->GetFormat()->GetEditInReadonly();
         bIsHidden = pPS->IsHiddenFlag();
     }
-    SwIterator<SwSectionFormat,SwSectionFormat> aIter(*this);
     if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag())
         CallSwClientNotify(sw::LegacyModifyHint(pProtect, pProtect));
 
diff --git a/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx 
b/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx
index 1c1a220265bf..f2379d2cc33c 100644
--- a/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx
@@ -44,8 +44,6 @@ rtl::Reference< DAVSession > 
DAVSessionFactory::createDAVSession(
 
     if ( aIt == m_aMap.end() )
     {
-        CurlUri const aURI( inUri );
-
         std::unique_ptr< DAVSession > xElement(
             new CurlSession(rxContext, this, inUri, rFlags, *m_xProxyDecider) 
);
 
@@ -65,11 +63,6 @@ rtl::Reference< DAVSession > 
DAVSessionFactory::createDAVSession(
         osl_atomic_decrement( &aIt->second->m_nRefCount );
         aIt->second->m_aContainerIt = m_aMap.end();
 
-        // If URL scheme is different from http or https we definitely
-        // have to use a proxy and therefore can optimize the getProxy
-        // call a little:
-        CurlUri const aURI( inUri );
-
         aIt->second = new CurlSession(rxContext, this, inUri, rFlags, 
*m_xProxyDecider);
         aIt->second->m_aContainerIt = aIt;
         return aIt->second;
diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx
index c755a70ebad1..3c40dd8f9832 100644
--- a/vcl/source/bitmap/bitmap.cxx
+++ b/vcl/source/bitmap/bitmap.cxx
@@ -1512,7 +1512,6 @@ bool Bitmap::Dither()
         BitmapScopedWriteAccess pWriteAcc(aNewBmp);
         if( pReadAcc && pWriteAcc )
         {
-            BitmapColor aColor;
             tools::Long nWidth = pReadAcc->Width();
             tools::Long nWidth1 = nWidth - 1;
             tools::Long nHeight = pReadAcc->Height();
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index b22170c80c60..8bb7e0f3e984 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -345,9 +345,6 @@ SalLayoutGlyphsCache::GetLayoutGlyphs(VclPtr<const 
OutputDevice> outputDevice, c
                            == CachedGlyphsKey(outputDevice, text, 
mLastSubstringKey->index,
                                               mLastSubstringKey->len, 
nLogicWidth))
                 {
-                    std::unique_ptr<SalLayout> layout
-                        = outputDevice->ImplLayout(text, nIndex, nLen, 
Point(0, 0), nLogicWidth, {},
-                                                   glyphItemsOnlyLayout, 
layoutCache);
                     GetLayoutGlyphs(outputDevice, text, 0, text.getLength(), 
nLogicWidth,
                                     layoutCache);
                     itWhole = mCachedGlyphs.find(keyWhole);
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index b4ac7ac08ffa..5a1b36ea8472 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -401,9 +401,6 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& 
xWindow, MouseNotifyEvent
             }
 
             // Call the hook also, if Window is disabled
-            Point aChildPos = pChild->ImplFrameToOutput( aMousePos );
-            MouseEvent aMEvt( aChildPos, pWinFrameData->mnClickCount, nMode, 
nCode, nCode );
-            NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt );
 
             if ( nSVEvent == MouseNotifyEvent::MOUSEBUTTONDOWN )
                 return true;
diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 91594957d66b..4c2aab8e7a28 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -3163,8 +3163,6 @@ IMPL_LINK_NOARG(GtkSalFrame, AsyncScroll, Timer *, void)
 {
     assert(!m_aPendingScrollEvents.empty());
 
-    SalWheelMouseEvent aEvent;
-
     GdkEvent* pEvent = m_aPendingScrollEvents.back();
     auto nEventX = pEvent->scroll.x;
     auto nEventY = pEvent->scroll.y;
diff --git a/xmlsecurity/source/helper/xsecctl.cxx 
b/xmlsecurity/source/helper/xsecctl.cxx
index e1caea0fade9..5a9bf57ec061 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -926,7 +926,6 @@ void XSecController::exportOOXMLSignature(const 
uno::Reference<embed::XStorage>&
 void XSecController::UpdateSignatureInformation(sal_Int32 const nSecurityId,
     std::vector<SignatureInformation::X509Data> && rDatas)
 {
-    SignatureInformation aInf( 0 );
     int const nIndex = findSignatureInfor(nSecurityId);
     assert(nIndex != -1); // nothing should touch this between parsing and 
verify
     m_vInternalSignatureInformations[nIndex].signatureInfor.X509Datas = 
std::move(rDatas);

Reply via email to