From d09447287f02cdf479cf2e542e4ab0efe7a024fe Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 24 Nov 2021 16:50:57 +0100 Subject: [PATCH] Fix "array subscript is of type 'char'" on NetBSD 9 In file included from rdata.c:602: In file included from ./code.h:88: ./rdata/in_1/svcb_64.c:259:9: warning: array subscript is of type 'char' [-Wchar-subscripts] if (!isdigit(*region->base)) { ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/sys/ctype_inline.h:51:44: note: expanded from macro 'isdigit' #define isdigit(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_D)) ^~~~ --- lib/dns/rdata/in_1/svcb_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/rdata/in_1/svcb_64.c b/lib/dns/rdata/in_1/svcb_64.c index 12e8caae52..a9d65f98da 100644 --- a/lib/dns/rdata/in_1/svcb_64.c +++ b/lib/dns/rdata/in_1/svcb_64.c @@ -256,7 +256,7 @@ svc_fromtext(isc_textregion_t *region, isc_buffer_t *target) { RETERR(alpn_fromtxt(region, target)); break; case sbpr_port: - if (!isdigit(*region->base)) { + if (!isdigit((unsigned char)*region->base)) { return (DNS_R_SYNTAX); } ul = strtoul(region->base, &e, 10);