celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject [celix] branch develop updated: silence coverity issue
Date Wed, 11 Sep 2019 18:19:26 GMT
This is an automated email from the ASF dual-hosted git repository.

bpetri pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/develop by this push:
     new 78e9b26  silence coverity issue
78e9b26 is described below

commit 78e9b26d0f3dc6fd36bfee91a50239cea136f1c2
Author: Bjoern Petri <bpetri@apache.org>
AuthorDate: Wed Sep 11 20:16:03 2019 +0200

    silence coverity issue
    
    coverity complains about an invalid type in argument to printf
    format specifier. Although this is obviously a false positive,
    a simple cast should prevent coverity from complaining.
---
 libs/framework/include/celix_log.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/framework/include/celix_log.h b/libs/framework/include/celix_log.h
index 4c1d631..883cafc 100644
--- a/libs/framework/include/celix_log.h
+++ b/libs/framework/include/celix_log.h
@@ -63,7 +63,7 @@ struct framework_logger {
 #define framework_logIfError(logger, status, error, fmsg, args...) \
     if (status != CELIX_SUCCESS) { \
         if (error != NULL) { \
-            fw_logCode(logger, OSGI_FRAMEWORK_LOG_ERROR, status, #fmsg";\n Cause: %s", ##
args, error); \
+            fw_logCode(logger, OSGI_FRAMEWORK_LOG_ERROR, status, #fmsg";\n Cause: %s", ##
args, (char*) error); \
         } else { \
             fw_logCode(logger, OSGI_FRAMEWORK_LOG_ERROR, status, #fmsg, ## args); \
         } \


Mime
View raw message