[Libreoffice-commits] core.git: 3 commits - include/vcl sc/inc sw/source vcl/unx
Caolán McNamara
caolanm at redhat.com
Sat Sep 3 18:34:22 UTC 2016
include/vcl/ppdparser.hxx | 1 +
sc/inc/compiler.hxx | 4 ++--
sw/source/core/layout/pagechg.cxx | 2 +-
vcl/unx/generic/printer/ppdparser.cxx | 7 +++++++
4 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit e65b42831bca279d67748eaacb119e844d3d6964
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 3 19:07:22 2016 +0100
coverity#1371244 Missing move assignment operator
Change-Id: I172f8397a96e5b7d0d4639e35c591caea2a0eef4
diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx
index 418f4b0..34b41cf 100644
--- a/include/vcl/ppdparser.hxx
+++ b/include/vcl/ppdparser.hxx
@@ -256,6 +256,7 @@ public:
PPDContext( const PPDParser* pParser = nullptr );
PPDContext( const PPDContext& rContext ) { operator=( rContext ); }
PPDContext& operator=( const PPDContext& rContext );
+ PPDContext& operator=( PPDContext&& rContext );
~PPDContext();
void setParser( const PPDParser* );
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 5f83ff7..d68ca2c 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1584,6 +1584,13 @@ PPDContext& PPDContext::operator=( const PPDContext& rCopy )
return *this;
}
+PPDContext& PPDContext::operator=( PPDContext&& rCopy )
+{
+ std::swap(m_pParser, rCopy.m_pParser);
+ std::swap(m_aCurrentValues, rCopy.m_aCurrentValues);
+ return *this;
+}
+
PPDContext::~PPDContext()
{
}
commit 0047512ad973ad2d214eff6afd06c9eab856dfba
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 3 19:04:42 2016 +0100
try and silence uninit_member
Change-Id: Iac633a1793a79049aa6e7adde1692b469b03b74b
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 14e760e..9b7cb58 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -135,8 +135,8 @@ public:
short nJump[ FORMULA_MAXJUMPCOUNT + 1 ]; // If/Chose token
};
- //! members not initialized
- ScRawToken() {}
+ // coverity[uninit_member] - members deliberately not initialized
+ ScRawToken() {}
private:
~ScRawToken() {} //! only delete via Delete()
public:
commit dca56edbb1a0feae7cc8fa090e298ec38ecb5602
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Sep 3 18:59:14 2016 +0100
coverity#1372444 Dereference after null check
Change-Id: Ia756854e1f4a848b62dda38c9667ddd032989605
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index dd2aab0..e795c1d 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1050,7 +1050,7 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
{
SAL_INFO( "sw.pageframe", "CheckPageDescs phys: " << pPage->GetPhyPageNum()
<< " c: 1+3 - skip next page of p: " << pPage );
- if (pPage->GetPageDesc() != pPrevPage->GetPageDesc())
+ if (pPrevPage && pPage->GetPageDesc() != pPrevPage->GetPageDesc())
pPage->SetPageDesc( pPrevPage->GetPageDesc(), nullptr );
// We can skip the next page, as all checks were already done!
pPage = static_cast<SwPageFrame*>(pNextPage->GetNext());
More information about the Libreoffice-commits
mailing list