diff options
author | Eduardo Mendi <eduardox.mendi@intel.com> | 2014-04-15 17:29:52 +0200 |
---|---|---|
committer | Mattijs Korpershoek <mattijsx.korpershoek@intel.com> | 2014-06-25 10:52:22 +0200 |
commit | 30095b3c0b84e85caf253a27e41254eaf35e4ca7 (patch) | |
tree | 0575594ba2fa09db75a1eabcf17f2c85971deed9 /parameter | |
parent | cce85f6b6691e4b1ddb81171e3ca5b5aeb71e6b9 (diff) | |
download | external_parameter-framework-30095b3c0b84e85caf253a27e41254eaf35e4ca7.zip external_parameter-framework-30095b3c0b84e85caf253a27e41254eaf35e4ca7.tar.gz external_parameter-framework-30095b3c0b84e85caf253a27e41254eaf35e4ca7.tar.bz2 |
Fix KW10 issues
BZ: 186081
Due to upgrade klocwork (KW version from 9.6 to 10.0)
new issues have been raised.
This patch fix the new issues raised in PFW.
Change-Id: I54c14e4d6da1c9a5f8d82aec1769a9e7e948db50
Signed-off-by: Eduardo Mendi <eduardox.mendi@intel.com>
Diffstat (limited to 'parameter')
-rwxr-xr-x | parameter/Element.cpp | 8 | ||||
-rwxr-xr-x | parameter/SubsystemObject.cpp | 8 | ||||
-rw-r--r-- | parameter/SystemClass.cpp | 8 |
3 files changed, 18 insertions, 6 deletions
diff --git a/parameter/Element.cpp b/parameter/Element.cpp index e5987e1..6d1d418 100755 --- a/parameter/Element.cpp +++ b/parameter/Element.cpp @@ -58,7 +58,9 @@ void CElement::log_info(const string& strMessage, ...) const va_end(listPointer); - doLog(false, pacBuffer); + if (pacBuffer != NULL) { + doLog(false, pacBuffer); + } free(pacBuffer); } @@ -74,7 +76,9 @@ void CElement::log_warning(const string& strMessage, ...) const va_end(listPointer); - doLog(true, pacBuffer); + if (pacBuffer != NULL) { + doLog(true, pacBuffer); + } free(pacBuffer); } diff --git a/parameter/SubsystemObject.cpp b/parameter/SubsystemObject.cpp index fd263c6..fb635c8 100755 --- a/parameter/SubsystemObject.cpp +++ b/parameter/SubsystemObject.cpp @@ -222,7 +222,9 @@ void CSubsystemObject::log_info(const string& strMessage, ...) const va_end(listPointer); - _pInstanceConfigurableElement->log_info(pacBuffer); + if (pacBuffer != NULL) { + _pInstanceConfigurableElement->log_info(pacBuffer); + } free(pacBuffer); } @@ -238,7 +240,9 @@ void CSubsystemObject::log_warning(const string& strMessage, ...) const va_end(listPointer); - _pInstanceConfigurableElement->log_warning(pacBuffer); + if (pacBuffer != NULL) { + _pInstanceConfigurableElement->log_warning(pacBuffer); + } free(pacBuffer); } diff --git a/parameter/SystemClass.cpp b/parameter/SystemClass.cpp index e4fab19..8ab7c94 100644 --- a/parameter/SystemClass.cpp +++ b/parameter/SystemClass.cpp @@ -219,9 +219,13 @@ bool CSystemClass::loadPlugins(list<string>& lstrPluginFiles, list<string>& lstr if (!lib_handle) { + const char *err = dlerror(); // Failed - lstrError.push_back("Plugin load failed: " + string(dlerror())); - + if (err == NULL) { + lstrError.push_back("dlerror failed"); + } else { + lstrError.push_back("Plugin load failed: " + string(err)); + } // Next plugin ++it; |