(trunk libT) silence some unused variable warnings from gcc when building with -DNDEBUG

This commit is contained in:
Jordan Lee 2011-02-02 05:18:33 +00:00
parent cea3221461
commit fc1c5fe553
3 changed files with 4 additions and 7 deletions

View File

@ -772,8 +772,7 @@ evbuffer_peek_all( struct evbuffer * buf, size_t * setme_vecCount )
const size_t byteCount = evbuffer_get_length( buf );
const int vecCount = evbuffer_peek( buf, byteCount, NULL, NULL, 0 );
struct evbuffer_iovec * iovec = tr_new0( struct evbuffer_iovec, vecCount );
const int n = evbuffer_peek( buf, byteCount, NULL, iovec, vecCount );
assert( vecCount == n );
assert( vecCount == evbuffer_peek( buf, byteCount, NULL, iovec, vecCount ) );
*setme_vecCount = vecCount;
return iovec;
}

View File

@ -586,11 +586,10 @@ tr_dhtCallback(unsigned char *buf, int buflen,
struct sockaddr *from, socklen_t fromlen,
void *sv )
{
tr_session *ss = (tr_session*)sv;
time_t tosleep;
int rc;
assert(tr_isSession(ss));
assert(tr_isSession(sv));
if(sv != session)
return;

View File

@ -112,15 +112,14 @@ rebind_ipv6(tr_session *ss, tr_bool force)
}
static void
event_callback(int s, short type, void *sv)
event_callback(int s, short type UNUSED, void *sv)
{
tr_session *ss = (tr_session*)sv;
unsigned char *buf;
struct sockaddr_storage from;
socklen_t fromlen;
int rc;
assert(tr_isSession(ss));
assert(tr_isSession(sv));
assert(type == EV_READ);
buf = malloc(4096);