Commit 90fc2f61 authored by Pekka Pessi's avatar Pekka Pessi

http_basic.c, http_extra.c, inet_ntop.c: removed warnings

Patch from Michael Jerris.

darcs-hash:20061121073502-65a35-02dccc31fdb723770afce915e4fd1a816caf820f.gz
parent f87aa5cc
......@@ -247,7 +247,7 @@ char *http_status_dup_one(http_header_t *dst, http_header_t const *src,
st->st_status = o->st_status;
MSG_STRING_DUP(b, st->st_phrase, o->st_phrase);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......@@ -719,7 +719,7 @@ char *http_host_dup_one(http_header_t *dst, http_header_t const *src,
MSG_STRING_DUP(b, h->h_host, o->h_host);
MSG_STRING_DUP(b, h->h_port, o->h_port);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......@@ -863,7 +863,7 @@ char *http_if_range_dup_one(http_header_t *dst, http_header_t const *src,
ifr->ifr_time = o->ifr_time;
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......@@ -1200,7 +1200,7 @@ char *http_range_dup_one(msg_header_t *dst, msg_header_t const *src,
o->rng_specs, b, xtra);
MSG_STRING_DUP(b, rng->rng_unit, o->rng_unit);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......@@ -1430,7 +1430,7 @@ char *http_te_dup_one(msg_header_t *dst, msg_header_t const *src,
MSG_STRING_DUP(b, te->te_extension, o->te_extension);
if (te->te_params) http_te_update(te);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......@@ -1578,7 +1578,7 @@ static char *http_via_dup_one(http_header_t *dst, http_header_t const *src,
MSG_STRING_DUP(b, v->v_port, o->v_port);
MSG_STRING_DUP(b, v->v_comment, o->v_comment);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......
......@@ -244,7 +244,7 @@ char *http_cookie_dup_one(msg_header_t *dst, msg_header_t const *src,
b = msg_params_dup(&c->c_params, o->c_params, b, xtra);
http_cookie_update(c);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......@@ -460,7 +460,7 @@ char *http_set_cookie_dup_one(msg_header_t *dst, msg_header_t const *src,
b = msg_params_dup(&sc->sc_params, o->sc_params, b, xtra);
http_set_cookie_update(sc);
assert(b <= end);
assert(b <= end); (void)end;
return b;
}
......
......@@ -80,7 +80,7 @@ inet_ntop4(const unsigned char *src, char *dst, size_t size)
char tmp[sizeof "255.255.255.255"];
if (snprintf(tmp, sizeof tmp, fmt,
src[0], src[1], src[2], src[3]) > size) {
src[0], src[1], src[2], src[3]) >= size) {
su_seterrno(ENOSPC);
return NULL;
}
......@@ -106,7 +106,7 @@ inet_ntop6(unsigned char const *src, char *dst, size_t size)
* to use pointer overlays. All the world's not a VAX.
*/
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
struct { int base, len; } best, cur;
struct { int base, len; } best = { -1 , 0 }, cur = { -1, 0 };
unsigned int words[8];
int i;
......@@ -173,7 +173,7 @@ inet_ntop6(unsigned char const *src, char *dst, size_t size)
/*
* Check for overflow, copy, and we're done.
*/
if ((size_t)(tp - tmp) > size) {
if ((size_t)(tp - tmp) >= size) {
su_seterrno(ENOSPC);
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment