diff --git a/bin/tests/sock_test.c b/bin/tests/sock_test.c index 3422d5957a..fd8c8eb718 100644 --- a/bin/tests/sock_test.c +++ b/bin/tests/sock_test.c @@ -102,12 +102,12 @@ my_recv(isc_task_t *task, isc_event_t *event) if (strcmp(event->arg, "so2")) { region = dev->region; strcpy(buf, "\r\nReceived: "); - strncat(buf, region.base, region.length); + strncat(buf, (char *)region.base, region.length); buf[32] = 0; /* ensure termination */ strcat(buf, "\r\n\r\n"); region.base = isc_mem_get(event->mctx, strlen(buf) + 1); region.length = strlen(buf) + 1; - strcpy(region.base, buf); /* strcpy is safe */ + strcpy((char *)region.base, buf); /* strcpy is safe */ isc_socket_send(sock, ®ion, task, my_send, event->arg); } else { region = dev->region; @@ -187,7 +187,7 @@ my_connect(isc_task_t *task, isc_event_t *event) strcpy(buf, "GET / HTTP/1.1\r\nHost: www.flame.org\r\nConnection: Close\r\n\r\n"); region.base = isc_mem_get(event->mctx, strlen(buf) + 1); region.length = strlen(buf) + 1; - strcpy(region.base, buf); /* strcpy is safe */ + strcpy((char *)region.base, buf); /* strcpy is safe */ isc_socket_send(sock, ®ion, task, my_http_get, event->arg); diff --git a/lib/dns/name.c b/lib/dns/name.c index 8a8bef4914..f43b38ca4f 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -140,7 +140,7 @@ static unsigned char maptolower[] = { static struct dns_name root = { NAME_MAGIC, - "", 1, 1, NULL, + (unsigned char *)"", 1, 1, NULL, {(void *)-1, (void *)-1} }; diff --git a/lib/isc/buffer.c b/lib/isc/buffer.c index 047060585e..a17416dfad 100644 --- a/lib/isc/buffer.c +++ b/lib/isc/buffer.c @@ -27,7 +27,7 @@ #define BUFFER_MAGIC 0x42756621U /* Buf!. */ void -isc_buffer_init(isc_buffer_t *b, unsigned char *base, unsigned int length, +isc_buffer_init(isc_buffer_t *b, void *base, unsigned int length, unsigned int type) { /* * Make 'b' refer to the 'length'-byte region starting at base. @@ -105,7 +105,7 @@ isc_buffer_available(isc_buffer_t *b, isc_region_t *r) { REQUIRE(VALID_BUFFER(b)); REQUIRE(r != NULL); - r->base = b->base + b->used; + r->base = (unsigned char *)b->base + b->used; r->length = b->length - b->used; } diff --git a/lib/isc/include/isc/buffer.h b/lib/isc/include/isc/buffer.h index 2b935c144f..dbaf912106 100644 --- a/lib/isc/include/isc/buffer.h +++ b/lib/isc/include/isc/buffer.h @@ -110,7 +110,7 @@ typedef struct isc_buffer { void -isc_buffer_init(isc_buffer_t *b, unsigned char *base, unsigned int length, +isc_buffer_init(isc_buffer_t *b, void *base, unsigned int length, unsigned int type); /* * Make 'b' refer to the 'length'-byte region starting at base.