[Libreoffice-commits] .: sal/qa sal/rtl

Stephan Bergmann sbergmann at kemper.freedesktop.org
Sun Jan 15 13:42:46 PST 2012


 sal/qa/osl/mutex/osl_Mutex.cxx |    8 ++++----
 sal/rtl/source/uri.cxx         |    6 ++++++
 2 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 5eea018d806f96e70c42e6d26922bb6a0c35d466
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sun Jan 15 22:42:25 2012 +0100

    Clang -Wdangling-else, -Wuninitialized.

diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index f4f34d6..745f35b 100644
--- a/sal/qa/osl/mutex/osl_Mutex.cxx
+++ b/sal/qa/osl/mutex/osl_Mutex.cxx
@@ -266,7 +266,7 @@ protected:
     {
         // block here if the mutex has been acquired
         Mutex* pGlobalMutex;
-        pGlobalMutex = pGlobalMutex->getGlobalMutex( );
+        pGlobalMutex = Mutex::getGlobalMutex( );
         pGlobalMutex->acquire( );
         printf("# Global Mutex acquired. \n" );
         pGlobalMutex->release( );
@@ -522,7 +522,7 @@ namespace osl_Mutex
         void getGlobalMutex_001()
         {
             Mutex* pGlobalMutex;
-            pGlobalMutex = pGlobalMutex->getGlobalMutex();
+            pGlobalMutex = Mutex::getGlobalMutex();
             pGlobalMutex->acquire();
 
             GlobalMutexThread myThread;
@@ -545,11 +545,11 @@ namespace osl_Mutex
             sal_Bool bRes;
 
             Mutex *pGlobalMutex;
-            pGlobalMutex = pGlobalMutex->getGlobalMutex( );
+            pGlobalMutex = Mutex::getGlobalMutex( );
             pGlobalMutex->acquire( );
             {
                 Mutex *pGlobalMutex1;
-                pGlobalMutex1 = pGlobalMutex1->getGlobalMutex( );
+                pGlobalMutex1 = Mutex::getGlobalMutex( );
                 bRes = pGlobalMutex1->release( );
             }
 
diff --git a/sal/rtl/source/uri.cxx b/sal/rtl/source/uri.cxx
index af5da83..2c42abb 100644
--- a/sal/rtl/source/uri.cxx
+++ b/sal/rtl/source/uri.cxx
@@ -391,7 +391,9 @@ void parseUriRef(rtl_uString const * pUriRef, Components * pComponents)
     sal_Unicode const * pPos = pBegin;
 
     if (pPos != pEnd && isAlpha(*pPos))
+    {
         for (sal_Unicode const * p = pPos + 1; p != pEnd; ++p)
+        {
             if (*p == ':')
             {
                 pComponents->aScheme.pBegin = pBegin;
@@ -401,7 +403,11 @@ void parseUriRef(rtl_uString const * pUriRef, Components * pComponents)
             }
             else if (!isAlpha(*p) && !isDigit(*p) && *p != '+' && *p != '-'
                      && *p != '.')
+            {
                 break;
+            }
+        }
+    }
 
     if (pEnd - pPos >= 2 && pPos[0] == '/' && pPos[1] == '/')
     {


More information about the Libreoffice-commits mailing list