Casts for printf portable.

git-svn-id: file:///svn/unbound/trunk@219 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-04-03 10:20:59 +00:00
parent c214e7c4cb
commit 6903bd42af
5 changed files with 6 additions and 5 deletions

View File

@ -150,7 +150,7 @@ worker_handle_reply(struct comm_point* c, void* arg, int error,
}
rep->flags = ldns_buffer_read_u16_at(c->buffer, 2);
rep->replysize = ldns_buffer_limit(c->buffer) - DNS_ID_AND_FLAGS;
log_info("got reply of size %d", rep->replysize);
log_info("got reply of size %u", (unsigned)rep->replysize);
rep->reply = (uint8_t*)malloc(rep->replysize);
if(!rep->reply) {
free(rep);

View File

@ -7,6 +7,7 @@
- compilation without locks fixup.
- removed include of unportable header from lookup3.c.
- more portable use of struct msghdr.
- casts for printf warning portability.
2 April 2007: Wouter
- check sizes of udp received messages, not too short.

View File

@ -123,7 +123,7 @@ for((i=0; i<${#hostname[*]}; i=$i+1)); do
SVN=yes
IP6=yes
FIXCONFIGURE=no
RUN_TEST=no
RUN_TEST=yes
LDNS=
LIBEVENT=
eval ${vars[$i]}

View File

@ -184,6 +184,6 @@ log_hex(const char* msg, void* data, size_t length)
buf[i*2 + 1] = hexchar[ data8[i] & 0xF ];
}
buf[length*2] = 0;
log_info("%s[%d] %s", msg, length, buf);
log_info("%s[%u] %s", msg, (unsigned)length, buf);
free(buf);
}

View File

@ -125,8 +125,8 @@ void slabhash_status(struct slabhash* sl, const char* id, int extended)
{
size_t i;
char num[17];
log_info("Slabhash %s: %d tables mask=%x shift=%d",
id, sl->size, sl->mask, sl->shift);
log_info("Slabhash %s: %u tables mask=%x shift=%d",
id, (unsigned)sl->size, sl->mask, sl->shift);
for(i=0; i<sl->size; i++) {
snprintf(num, sizeof(num), "table %u", (unsigned)i);
lruhash_status(sl->array[i], num, extended);