Module: sip-router
Branch: master
Commit: f0fb6f1e9fbb2f7f0c2bed5ba0d50a56cf5cf444
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f0fb6f1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 6 17:16:25 2013 +0100
core: fixed several clang compiler warnings
---
dset.c | 4 ++--
flags.c | 2 +-
msg_translator.c | 2 +-
parser/parse_fline.c | 2 +-
select_buf.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dset.c b/dset.c
index 13b000b..4b886bd 100644
--- a/dset.c
+++ b/dset.c
@@ -90,7 +90,7 @@ branch_t *get_sip_branch(int idx)
return NULL;
if(idx<0)
{
- if(nr_branches + idx >= 0)
+ if((int)nr_branches + idx >= 0)
return &branches[nr_branches+idx];
return NULL;
}
@@ -109,7 +109,7 @@ int drop_sip_branch(int idx)
{
if(nr_branches==0 || idx>=nr_branches)
return 0;
- if(idx<0 && nr_branches+idx<0)
+ if(idx<0 && (int)nr_branches+idx<0)
return 0;
/* last branch */
if(idx==nr_branches-1)
diff --git a/flags.c b/flags.c
index 1523d0b..becb569 100644
--- a/flags.c
+++ b/flags.c
@@ -74,7 +74,7 @@ int flag_in_range( flag_t flag ) {
flag, MAX_FLAG );
return 0;
}
- if (flag<0) {
+ if ((int)flag<0) {
LOG(L_ERR, "ERROR: message flag (%d) must be in range %d..%d\n",
flag, 0, MAX_FLAG );
return 0;
diff --git a/msg_translator.c b/msg_translator.c
index b4581e7..13b0785 100644
--- a/msg_translator.c
+++ b/msg_translator.c
@@ -1575,7 +1575,7 @@ static inline int adjust_clen(struct sip_msg* msg, int body_delta,
int proto)
*/
/* no need for Content-Length if it's and UDP packet and
* it hasn't Content-Length already */
- if ((msg->content_length==0)){
+ if (msg->content_length==0){
/* content-length doesn't exist, append it */
/* msg->unparsed should point just before the final crlf
* - whole message was parsed by the above parse_headers
diff --git a/parser/parse_fline.c b/parser/parse_fline.c
index 8dacfe5..b8fee65 100644
--- a/parser/parse_fline.c
+++ b/parser/parse_fline.c
@@ -233,7 +233,7 @@ error:
if (prn) {
for (t=0; t<offset; t++)
if (*(buffer+t)) *(prn+t)=*(buffer+t);
- else *(prn+t)='�';
+ else *(prn+t)=176; /* '�' */
LOG(L_DBG, "parsed so far: %.*s\n", offset, ZSW(prn) );
pkg_free( prn );
};
diff --git a/select_buf.c b/select_buf.c
index b3463a8..7277d48 100644
--- a/select_buf.c
+++ b/select_buf.c
@@ -162,7 +162,7 @@ int int_to_static_buffer(str* res, int val)
{
char *c;
c = int2str(abs(val), &res->len);
- res->s = get_static_buffer(res->len+(val<0)?1:0);
+ res->s = get_static_buffer(res->len+((val<0)?1:0));
if (!res->s) return -1;
if (val < 0) {
res->s[0] = '-';