summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-15 22:42:25 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-15 22:42:25 +0100
commit5eea018d806f96e70c42e6d26922bb6a0c35d466 (patch)
tree41728718a5fc725af45dd7524548e959eef066bd /sal
parentgbuild: simplify gb_Helper_abbreviate_dirs* (diff)
downloadcore-5eea018d806f96e70c42e6d26922bb6a0c35d466.tar.gz
core-5eea018d806f96e70c42e6d26922bb6a0c35d466.zip
Clang -Wdangling-else, -Wuninitialized.
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/osl/mutex/osl_Mutex.cxx8
-rw-r--r--sal/rtl/source/uri.cxx6
2 files changed, 10 insertions, 4 deletions
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx
index f4f34d6e0c7b..745f35b84ee1 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 af5da83e785f..2c42abbda7dc 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] == '/')
{