[Libreoffice-commits] core.git: 6 commits - vcl/inc vcl/source vcl/unx

Caolán McNamara caolanm at redhat.com
Fri Mar 21 07:39:10 PDT 2014


 vcl/inc/unx/salgdi.h                   |    1 -
 vcl/source/window/layout.cxx           |    1 +
 vcl/unx/generic/gdi/salgdi.cxx         |    1 +
 vcl/unx/generic/gdi/salgdi3.cxx        |    2 --
 vcl/unx/generic/window/salframe.cxx    |    5 +++--
 vcl/unx/generic/window/salobj.cxx      |   13 +++++--------
 vcl/unx/gtk/a11y/atktextattributes.cxx |    7 ++-----
 7 files changed, 12 insertions(+), 18 deletions(-)

New commits:
commit 706893eb2d737e1475945f4204f95b7382992240
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 21 13:26:16 2014 +0000

    coverity#736078 Missing break in switch
    
    Change-Id: I9b47828d3aea4d84788958f56056c1b62a806b36

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 4da3a8f..4c8a776 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -602,6 +602,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation)
             break;
         default:
             SAL_WARN("vcl.layout", "todo unimplemented layout style");
+            //fall-through
         case VCL_BUTTONBOX_DEFAULT_STYLE:
         case VCL_BUTTONBOX_END:
             if (!aReq.m_aMainGroupDimensions.empty())
commit adcb33d71d2c2732fb5af7d19a4cd58adb009993
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 21 13:23:09 2014 +0000

    coverity#708662 Uninitialized pointer field
    
    Change-Id: Icfa4ee2a525016775b5917143b5c4333212db362

diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 03e7f50..dc7a46a 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -110,7 +110,6 @@ protected:
 
     SalColor        nTextColor_;
     Pixel           nTextPixel_;
-    bool            bFontVertical_;
 
     bool            bDisableGraphite_;
 
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index c4b9cf9..3394c0f 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -92,6 +92,7 @@ X11SalGraphics::X11SalGraphics()
 {
     m_pFrame            = NULL;
     m_pVDev             = NULL;
+    m_pColormap         = NULL;
     m_pDeleteColormap   = NULL;
     hDrawable_          = None;
     m_aXRenderPicture    = 0;
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 109c95a..05e9de37 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -135,8 +135,6 @@ bool X11SalGraphics::setFont( const FontSelectPattern *pEntry, int nFallbackLeve
     if( !pEntry )
         return false;
 
-    bFontVertical_ = pEntry->mbVertical;
-
     // return early if this is not a valid font for this graphics
     if( !pEntry->mpFontData )
         return false;
commit 8c6f8b169c4f7b81defd8f85525abd07a5306339
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 21 13:19:32 2014 +0000

    coverity#705331 Missing break in switch
    
    Change-Id: Ie7416ac3b6cadce8e07d87b290869c0101c39783

diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 7e8e69a..240a3c9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -3981,7 +3981,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
                      XSetInputFocus( GetXDisplay(), GetShellWindow(),
                              RevertToNone, CurrentTime );
                  }
-
+                //fall-through
             case ButtonRelease:
             case MotionNotify:
             case EnterNotify:
commit 1ff71f598c65a312d569b1b00cbf8d40b5dfd03e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 21 13:18:26 2014 +0000

    coverity#705973 Dereference before null check
    
    Change-Id: Iee76f24ad73d103507594fb1433fba7d1294d759

diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index ad2dcd5..7e8e69a 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2595,7 +2595,8 @@ bool X11SalFrame::SetPluginParent( SystemParentData* pNewParent )
 {
     if( pNewParent->nSize >= sizeof(SystemParentData) )
         m_bXEmbed = pNewParent->aWindow != None && pNewParent->bXEmbedSupport;
-    createNewWindow( pNewParent ? pNewParent->aWindow : None );
+
+    createNewWindow(pNewParent->aWindow);
 
     return true;
 }
commit 2a36122dcb240d20bd20af24e9a334cde8e165ae
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 21 13:16:42 2014 +0000

    coverity#708674 Uninitialized pointer field
    
    Change-Id: Ie48cefda1ac7f626e8b5f969209c6960c124a889

diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index af85a8c..4588321 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -229,12 +229,13 @@ SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
     }
 }
 
-
-
 // SalObject Implementation
-
-
 X11SalObject::X11SalObject()
+    : mpParent(NULL)
+    , maPrimary(0)
+    , maSecondary(0)
+    , maColormap(0)
+    , mbVisible(false)
 {
     maSystemChildData.nSize     = sizeof( SystemEnvData );
     maSystemChildData.pDisplay  = GetGenericData()->GetSalDisplay()->GetDisplay();
@@ -247,15 +248,11 @@ X11SalObject::X11SalObject()
     maSystemChildData.pAppContext   = NULL;
     maSystemChildData.aShellWindow  = 0;
     maSystemChildData.pShellWidget  = NULL;
-    maPrimary                       = 0;
-    maSecondary                     = 0;
-    maColormap                      = 0;
 
     std::list< SalObject* >& rObjects = GetGenericData()->GetSalDisplay()->getSalObjects();
     rObjects.push_back( this );
 }
 
-
 X11SalObject::~X11SalObject()
 {
     std::list< SalObject* >& rObjects = GetGenericData()->GetSalDisplay()->getSalObjects();
commit b53dbf77dbbd0c65870877906f061e94e1ac5537
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Mar 21 13:13:59 2014 +0000

    coverity#735563 Logically dead code
    
    Change-Id: Idebbefe8c3d18df559fe4d9635dc407f51ec9f1d

diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index 243ea187..54e8f8f 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -638,7 +638,7 @@ String2Scale( uno::Any& rAny, const gchar * value )
 static gchar *
 CaseMap2String( const uno::Any& rAny )
 {
-    const gchar * value = NULL;
+    const gchar * value;
 
     switch( rAny.get<short>() )
     {
@@ -651,10 +651,7 @@ CaseMap2String( const uno::Any& rAny )
             break;
     }
 
-    if( value )
-        return g_strdup( value );
-
-    return NULL;
+    return g_strdup(value);
 }
 
 static bool


More information about the Libreoffice-commits mailing list