sc/source/ui/view/cellsh1.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 2ca20f147b5963928643ffe0e9b892d6466e7ea9
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Jan 8 16:27:30 2024 +0000
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Wed Jan 10 15:25:08 2024 +0100

    WaE: unused variable 'pCondFormat' [-Werror,-Wunused-variable] with NDEBUG
    
    Change-Id: I7b98cc883ce1c35d734b1348626b700278f7c903
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161796
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index a4bc6dba15d5..9a0542355497 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2199,7 +2199,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                 }
 
                 // try to find an existing conditional format
-                const ScConditionalFormat* pCondFormat = nullptr;
                 const ScPatternAttr* pPattern = rDoc.GetPattern(aPos.Col(), 
aPos.Row(), aPos.Tab());
                 ScConditionalFormatList* pList = 
rDoc.GetCondFormList(aPos.Tab());
                 const ScCondFormatIndexes& rCondFormats = 
pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData();
@@ -2211,7 +2210,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     for (const auto& rCondFormat : rCondFormats)
                     {
                         // check if at least one existing conditional format 
has the same range
-                        pCondFormat = pList->GetFormat(rCondFormat);
+                        const ScConditionalFormat* pCondFormat = 
pList->GetFormat(rCondFormat);
                         if(!pCondFormat)
                             continue;
 
@@ -2428,8 +2427,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                         else
                         {
                             // define an overlapping conditional format
-                            const ScConditionalFormat* pCondFormat = 
pInnerList->GetFormat(rInnerCondFormats[0]);
-                            assert(pCondFormat);
+                            
assert(pInnerList->GetFormat(rInnerCondFormats[0]));
                             bNewCondFormatDlg = true;
                         }
 

Reply via email to