From 5ace3f3b4f2f916d8b2acab1b5cc0fe2a5a19dee Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Jul 2014 09:59:26 +0100 Subject: clang scan-build: various warnings Change-Id: I4bdfb074b3cf6fcb49765322308dfa4b9ed67713 --- sal/osl/unx/module.cxx | 4 ++-- sal/osl/unx/thread.c | 4 ++-- sal/rtl/byteseq.cxx | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'sal') 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 #include #include - +#include #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 #include "system.h" #include #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 #include #include @@ -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; -- cgit