[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang l10ntools/source vcl/generic

Noel Grandin noel at peralex.com
Thu Aug 20 01:35:34 PDT 2015


 compilerplugins/clang/cstylecast.cxx   |    2 +-
 l10ntools/source/xmlparse.cxx          |    2 +-
 vcl/generic/fontmanager/fontconfig.cxx |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c06108b880e144e5ad56e35f842ad15f05b6e899
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Aug 20 10:28:49 2015 +0200

    implicit conversion of NULL constant to 'nullptr_t'
    
    Change-Id: I98f8df3f27fbd520f0bfbbb39c0e3cc5fa892b0d

diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 3d22920..0d1d906 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -302,7 +302,7 @@ void XMLFile::Print( XMLNode *pCur, sal_uInt16 nLevel )
 }
 XMLFile::~XMLFile()
 {
-    if( m_pXMLStrings != NULL )
+    if( m_pXMLStrings )
     {
         XMLHashMap::iterator pos = m_pXMLStrings->begin();
         for( ; pos != m_pXMLStrings->end() ; ++pos )
commit 5a58e809fceada72cecc389588bcd792eb3d8105
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Aug 20 10:26:24 2015 +0200

    loplugin:cstylecast
    
    and improve the error message in the plugin
    
    Change-Id: I8719832a48e14c132f463340fbbc537845f82b0b

diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx
index 9d96ac6..79971c3 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -198,7 +198,7 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
     report(
         DiagnosticsEngine::Warning, "%0 C-style cast from %1%2 to %3%4%5",
         expr->getSourceRange().getBegin())
-      << expr->getCastKindName() << incompFrom
+      << incompFrom
       << expr->getSubExprAsWritten()->getType() << incompTo << expr->getType()
       << performs << expr->getSourceRange();
     return true;
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 4f81f3d..becb419 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -497,7 +497,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
 
             FcResult eFileRes         = FcPatternGetString(pFSet->fonts[i], FC_FILE, 0, &file);
             FcResult eFamilyRes       = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &family, FC_FAMILY, FC_FAMILYLANG );
-            if (bMinimalFontset && strncmp((char*)family, "Liberation", strlen("Liberation")))
+            if (bMinimalFontset && strncmp(reinterpret_cast<char*>(family), "Liberation", strlen("Liberation")))
                 continue;
             FcResult eStyleRes        = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &style, FC_STYLE, FC_STYLELANG );
             FcResult eSlantRes        = FcPatternGetInteger(pFSet->fonts[i], FC_SLANT, 0, &slant);


More information about the Libreoffice-commits mailing list