Fraser Adams created PROTON-774:
-----------------------------------
Summary: Fix warnings in log.c and url.c and re-enable -Werror
Key: PROTON-774
URL: https://issues.apache.org/jira/browse/PROTON-774
Project: Qpid Proton
Issue Type: Bug
Components: proton-c
Reporter: Fraser Adams
Priority: Trivial
The files log.c and url.c generate warnings when compiled with CLang/emscripten
this prevents -Werror being used.
The warnings were:
[ 56%] Building C object
proton-c/bindings/javascript/CMakeFiles/qpid-proton-bitcode.dir/__/__/src/log.c.o
/home/fadams/qpid/git/qpid-proton/proton-c/src/log.c:38:13: warning: explicitly
assigning a variable of type 'bool' to itself [-Wself-assign]
enabled = enabled;
and
[ 58%] Building C object
proton-c/bindings/javascript/CMakeFiles/qpid-proton-bitcode.dir/__/__/src/url.c.o
/home/fadams/qpid/git/qpid-proton/proton-c/src/url.c:133:19: warning: unused
function 'len' [-Wunused-function]
static inline int len(const char *str) { return str ? strlen(str) : 0; }
The trivial fixes were to remove the spurious function in url.c and rename the
formal parameter to pn_log_enable in log.c
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)