diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-01 09:59:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-01 10:56:14 +0100 |
commit | 5ace3f3b4f2f916d8b2acab1b5cc0fe2a5a19dee (patch) | |
tree | 00cdcfc6ef33bc558bda62935d46377f033975d6 /sal | |
parent | 62cb50fd9b97358114dcc4d0c1afdcdd04341b0c (diff) |
clang scan-build: various warnings
Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/module.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/thread.c | 4 | ||||
-rw-r--r-- | sal/rtl/byteseq.cxx | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx index 1ebdfaced8c8..30fe2abb7603 100644 --- a/sal/osl/unx/module.cxx +++ b/sal/osl/unx/module.cxx @@ -25,7 +25,7 @@ #include <osl/thread.h> #include <osl/process.h> #include <osl/file.h> - +#include <assert.h> #include "system.h" #ifdef AIX @@ -169,7 +169,7 @@ oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nR oslModule osl_loadModuleRelativeAscii( oslGenericFunction baseModule, char const * relativePath, sal_Int32 mode) { - SAL_WARN_IF(relativePath == 0, "sal.osl", "illegal argument"); + assert(relativePath && "illegal argument"); if (relativePath[0] == '/') { return osl_loadModuleAscii(relativePath, mode); } else { diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 5335dd6bf3b8..17b4d6cf7946 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include <assert.h> #include "system.h" #include <string.h> #if defined(OPENBSD) @@ -202,7 +202,7 @@ static void* osl_thread_start_Impl (void* pData) int terminate; Thread_Impl* pImpl= (Thread_Impl*)pData; - OSL_ASSERT(pImpl); + assert(pImpl); pthread_mutex_lock (&(pImpl->m_Lock)); diff --git a/sal/rtl/byteseq.cxx b/sal/rtl/byteseq.cxx index fe241797475f..5fd6022cfa75 100644 --- a/sal/rtl/byteseq.cxx +++ b/sal/rtl/byteseq.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <assert.h> #include <string.h> #include <osl/diagnose.h> @@ -78,7 +79,7 @@ void SAL_CALL rtl_byte_sequence_realloc( sal_Sequence * pSequence, * pNew; sal_Int32 nElements; - OSL_ENSURE( ppSequence, "### null ptr!" ); + assert(ppSequence && "### null ptr!"); pSequence = *ppSequence; nElements = pSequence->nElements; |