mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
silence compiler warnings
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: db_test.c,v 1.59 2004/03/05 04:58:37 marka Exp $ */
|
||||
/* $Id: db_test.c,v 1.60 2005/03/16 22:22:27 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: Bob Halley
|
||||
@@ -76,8 +76,8 @@ print_result(const char *message, isc_result_t result) {
|
||||
message = "";
|
||||
}
|
||||
len = strlen(message);
|
||||
printf("%s%sresult %08x: %s\n", message, (len == 0) ? "" : " ", result,
|
||||
isc_result_totext(result));
|
||||
printf("%s%sresult %08x: %s\n", message, (len == 0U) ? "" : " ",
|
||||
result, isc_result_totext(result));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -477,7 +477,7 @@ main(int argc, char *argv[]) {
|
||||
continue;
|
||||
}
|
||||
len = strlen(s);
|
||||
if (len > 0 && s[len - 1] == '\n') {
|
||||
if (len > 0U && s[len - 1] == '\n') {
|
||||
s[len - 1] = '\0';
|
||||
len--;
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: journalprint.c,v 1.4 2004/03/05 04:58:37 marka Exp $ */
|
||||
/* $Id: journalprint.c,v 1.5 2005/03/16 22:22:28 marka Exp $ */
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/util.h>
|
||||
@@ -32,7 +32,7 @@ main(int argc, char **argv) {
|
||||
|
||||
if (argc != 2) {
|
||||
printf("usage: %s journal", argv[0]);
|
||||
exit(1);
|
||||
return(1);
|
||||
}
|
||||
|
||||
file = argv[1];
|
||||
@@ -41,5 +41,5 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(dns_journal_print(mctx, file, stdout) == ISC_R_SUCCESS);
|
||||
isc_mem_detach(&mctx);
|
||||
exit(0);
|
||||
return(0);
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: lwres_test.c,v 1.27 2004/03/05 04:58:38 marka Exp $ */
|
||||
/* $Id: lwres_test.c,v 1.28 2005/03/16 22:22:29 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -47,7 +47,7 @@ hexdump(const char *msg, void *base, size_t len) {
|
||||
p = base;
|
||||
cnt = 0;
|
||||
|
||||
printf("*** %s (%u bytes @ %p)\n", msg, len, base);
|
||||
printf("*** %s (%lu bytes @ %p)\n", msg, (unsigned long)len, base);
|
||||
|
||||
while (cnt < len) {
|
||||
if (cnt % 16 == 0)
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: name_test.c,v 1.37 2004/04/13 03:31:14 marka Exp $ */
|
||||
/* $Id: name_test.c,v 1.38 2005/03/16 22:22:29 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -168,14 +168,14 @@ main(int argc, char *argv[]) {
|
||||
dns_fixedname_init(&wname2);
|
||||
while (fgets(s, sizeof(s), stdin) != NULL) {
|
||||
len = strlen(s);
|
||||
if (len > 0 && s[len - 1] == '\n') {
|
||||
if (len > 0U && s[len - 1] == '\n') {
|
||||
s[len - 1] = '\0';
|
||||
len--;
|
||||
}
|
||||
isc_buffer_init(&source, s, len);
|
||||
isc_buffer_add(&source, len);
|
||||
|
||||
if (len > 0)
|
||||
if (len > 0U)
|
||||
result = dns_name_fromtext(name, &source, origin,
|
||||
downcase, NULL);
|
||||
else {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbt_test.c,v 1.44 2004/03/05 04:58:39 marka Exp $ */
|
||||
/* $Id: rbt_test.c,v 1.45 2005/03/16 22:22:30 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -224,7 +224,7 @@ iterate(dns_rbt_t *rbt, isc_boolean_t forward) {
|
||||
printf("start not found!\n");
|
||||
|
||||
else {
|
||||
while (1) {
|
||||
for (;;) {
|
||||
if (result == DNS_R_NEWORIGIN) {
|
||||
printf(" new origin: ");
|
||||
print_name(origin);
|
||||
@@ -314,8 +314,8 @@ main(int argc, char **argv) {
|
||||
length = strlen(buffer);
|
||||
|
||||
if (buffer[length - 1] != '\n') {
|
||||
printf("line to long (%d max), ignored\n",
|
||||
sizeof(buffer) - 2);
|
||||
printf("line to long (%lu max), ignored\n",
|
||||
(unsigned long)sizeof(buffer) - 2);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rwlock_test.c,v 1.22 2004/08/28 06:16:53 marka Exp $ */
|
||||
/* $Id: rwlock_test.c,v 1.23 2005/03/16 22:22:30 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -136,7 +136,7 @@ main(int argc, char *argv[]) {
|
||||
UNUSED(argc);
|
||||
UNUSED(argv);
|
||||
fprintf(stderr, "This test requires threads.\n");
|
||||
exit(1);
|
||||
return(1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sym_test.c,v 1.24 2004/03/05 04:58:40 marka Exp $ */
|
||||
/* $Id: sym_test.c,v 1.25 2005/03/16 22:22:30 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -73,7 +73,7 @@ main(int argc, char *argv[]) {
|
||||
|
||||
while (fgets(s, sizeof(s), stdin) != NULL) {
|
||||
len = strlen(s);
|
||||
if (len > 0 && s[len - 1] == '\n') {
|
||||
if (len > 0U && s[len - 1] == '\n') {
|
||||
s[len - 1] = '\0';
|
||||
len--;
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: wire_test.c,v 1.63 2004/03/05 04:58:40 marka Exp $ */
|
||||
/* $Id: wire_test.c,v 1.64 2005/03/16 22:22:31 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -140,10 +140,10 @@ main(int argc, char *argv[]) {
|
||||
}
|
||||
rp++;
|
||||
}
|
||||
if (len == 0)
|
||||
if (len == 0U)
|
||||
break;
|
||||
if (len % 2 != 0) {
|
||||
printf("bad input format: %d\n", len);
|
||||
if (len % 2 != 0U) {
|
||||
printf("bad input format: %lu\n", (unsigned long)len);
|
||||
exit(1);
|
||||
}
|
||||
if (len > sizeof(b) * 2) {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone_test.c,v 1.29 2004/03/05 04:58:40 marka Exp $ */
|
||||
/* $Id: zone_test.c,v 1.30 2005/03/16 22:22:31 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -120,7 +120,7 @@ setup(const char *zonename, const char *filename, const char *classname) {
|
||||
region.base = classname;
|
||||
region.length = strlen(classname);
|
||||
result = dns_rdataclass_fromtext(&rdclass,
|
||||
(isc_textregion_t *)®ion);
|
||||
(isc_textregion_t *)(void*)®ion);
|
||||
ERRRET(result, "dns_rdataclass_fromtext");
|
||||
|
||||
dns_zone_setclass(zone, rdclass);
|
||||
@@ -200,7 +200,7 @@ query(void) {
|
||||
dns_zone_dumptostream(zone, stdout);
|
||||
continue;
|
||||
}
|
||||
if (strlen(buf) == 0)
|
||||
if (strlen(buf) == 0U)
|
||||
continue;
|
||||
dns_fixedname_init(&name);
|
||||
isc_buffer_init(&buffer, buf, strlen(buf));
|
||||
|
Reference in New Issue
Block a user