summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-08-23 10:56:27 +0200
committerJulien Nabet <serval2412@yahoo.fr>2024-08-23 13:46:49 +0200
commit73884e28faeb457c01b80051a701c073112ad564 (patch)
tree9935cdf297d899e6d94f22da6df8ce82bc693d0e /sfx2/source
parent25541338ae51435b9c23fe69cfa4219096e2dd50 (diff)
-Werror=maybe-uninitialized in sfx2
/home/julien/lo/libo_perf/sfx2/source/dialog/splitwin.cxx: In member function ‘void SfxSplitWindow::InsertWindow(SfxDockingWindow*, const Size&)’: /home/julien/lo/libo_perf/sfx2/source/dialog/splitwin.cxx:462:23: error: ‘nL’ may be used uninitialized [-Werror=maybe-uninitialized] 462 | nLine = static_cast<short>(nL); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /home/julien/lo/libo_perf/sfx2/source/dialog/splitwin.cxx:433:16: note: ‘nL’ was declared here 433 | sal_uInt16 nL; | ^~ /home/julien/lo/libo_perf/sfx2/source/dialog/splitwin.cxx: In member function ‘void SfxSplitWindow::MoveWindow(SfxDockingWindow*, const Size&, sal_uInt16, sal_uInt16, bool)’: /home/julien/lo/libo_perf/sfx2/source/dialog/splitwin.cxx:552:21: error: ‘nL’ may be used uninitialized [-Werror=maybe-uninitialized] 552 | if ( nLine > nL && GetItemCount( GetItemId( nL ) ) == 1 ) | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/julien/lo/libo_perf/sfx2/source/dialog/splitwin.cxx:548:16: note: ‘nL’ was declared here 548 | sal_uInt16 nL, nP; | ^~ Change-Id: I816ec49fe2c63e4f448ae83251d3a24b08383903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172306 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/dialog/splitwin.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index b9597eacfc79..fcdb5a548817 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -430,7 +430,6 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
*/
{
short nLine = -1; // so that the first window cab set nline to 0
- sal_uInt16 nL;
sal_uInt16 nPos = 0;
bool bNewLine = true;
bool bSaveConfig = false;
@@ -457,6 +456,7 @@ void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize
if ( bNewLine && !pFoundDock )
{
// Not known until now in which real line it is located
+ sal_uInt16 nL = 0;
[[maybe_unused]] auto const ok = GetWindowPos( rDock.pWin, nL, nPos );
assert(ok);
nLine = static_cast<short>(nL);
@@ -545,7 +545,8 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
*/
{
- sal_uInt16 nL, nP;
+ sal_uInt16 nL = 0;
+ sal_uInt16 nP = 0;
[[maybe_unused]] auto const ok = GetWindowPos( pDockWin, nL, nP );
assert(ok);