2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 15:05:23 +00:00

eliminate compiler warnings (signed vs. unsigned)

This commit is contained in:
Bob Halley
1999-02-02 01:18:51 +00:00
parent 1c969834dc
commit fe47f41b13
5 changed files with 10 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ dns_db_t *db;
/*
* For debugging only... XXX
*/
void dump_packet(char *buf, u_int len);
void dump_packet(unsigned char *buf, u_int len);
static void
makename(isc_mem_t *mctx, char *text, dns_name_t *name, dns_name_t *origin) {

View File

@@ -54,7 +54,7 @@ typedef struct dns_message {
} dns_message_t;
void
dump_packet(char *buf, u_int len);
dump_packet(unsigned char *buf, u_int len);
dns_result_t
resolve_packet(dns_db_t *db, isc_buffer_t *source, isc_buffer_t *target);
@@ -67,7 +67,7 @@ void getmessage(dns_message_t *message, isc_buffer_t *source,
dns_result_t printmessage(dns_message_t *message);
void
dump_packet(char *buf, u_int len)
dump_packet(unsigned char *buf, u_int len)
{
extern dns_decompress_t dctx;
extern unsigned int rdcount, rlcount, ncount;

View File

@@ -1360,7 +1360,8 @@ static int
cmp_label(dns_label_t *a, dns_label_t *b) {
int i;
i = strncasecmp(a->base, b->base, MIN(a->length, b->length));
i = strncasecmp((char *)a->base, (char *)b->base,
MIN(a->length, b->length));
if (i == 0 && a->length != b->length)
return(a->length < b->length ? -1 : 1);

View File

@@ -427,7 +427,7 @@ add_rdataset_callback(dns_name_t *name, dns_rdataset_t *rdataset,
static dns_result_t
load(dns_db_t *db, char *filename) {
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
unsigned int soacount, nscount;
int soacount, nscount;
REQUIRE(VALID_RBTDB(rbtdb));

View File

@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: rdata.c,v 1.19 1999/02/01 21:34:51 marka Exp $ */
/* $Id: rdata.c,v 1.20 1999/02/02 01:18:19 halley Exp $ */
#include <config.h>
@@ -433,12 +433,12 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) {
unsigned int tl;
unsigned int n;
unsigned char *sp;
unsigned char *tp;
char *tp;
isc_region_t region;
isc_buffer_available(target, &region);
sp = source->base;
tp = region.base;
tp = (char *)region.base;
tl = region.length;
n = *sp++;
@@ -473,7 +473,7 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) {
return (DNS_R_NOSPACE);
*tp++ = '"';
tl--;
isc_buffer_add(target, tp - region.base);
isc_buffer_add(target, tp - (char *)region.base);
isc_region_consume(source, *source->base + 1);
return (DNS_R_SUCCESS);
}