The oft-copied parse.y code declares some variables as "unsigned char *" but passes them to functions that take "char *" arguments and doesn't make any use of the unsigned property.
For OpenBSD's clang, -Wpointer-sign has been disabled by default, but when that code is built elsewhere, the compiler will complain. I noticed and fixed this for Got and millert@ suggested that it should be applied to all copies of parse.y in OpenBSD, so here we go. OK? Index: bin/chio/parse.y =================================================================== RCS file: /cvs/src/bin/chio/parse.y,v retrieving revision 1.23 diff -u -p -r1.23 parse.y --- bin/chio/parse.y 15 Oct 2020 19:42:56 -0000 1.23 +++ bin/chio/parse.y 29 Sep 2021 18:32:58 -0000 @@ -179,9 +179,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -272,8 +272,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p; + char buf[8096]; + char *p; int quotec, next, c; int token; Index: sbin/dhcpleased/parse.y =================================================================== RCS file: /cvs/src/sbin/dhcpleased/parse.y,v retrieving revision 1.4 diff -u -p -r1.4 parse.y --- sbin/dhcpleased/parse.y 20 Sep 2021 11:46:22 -0000 1.4 +++ sbin/dhcpleased/parse.y 29 Sep 2021 18:14:01 -0000 @@ -463,10 +463,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: sbin/iked/parse.y =================================================================== RCS file: /cvs/src/sbin/iked/parse.y,v retrieving revision 1.132 diff -u -p -r1.132 parse.y --- sbin/iked/parse.y 18 Sep 2021 16:45:52 -0000 1.132 +++ sbin/iked/parse.y 29 Sep 2021 18:16:23 -0000 @@ -1510,10 +1510,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: sbin/ipsecctl/parse.y =================================================================== RCS file: /cvs/src/sbin/ipsecctl/parse.y,v retrieving revision 1.179 diff -u -p -r1.179 parse.y --- sbin/ipsecctl/parse.y 29 Dec 2020 19:50:03 -0000 1.179 +++ sbin/ipsecctl/parse.y 29 Sep 2021 18:33:54 -0000 @@ -1054,9 +1054,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -1148,8 +1148,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: sbin/pfctl/parse.y =================================================================== RCS file: /cvs/src/sbin/pfctl/parse.y,v retrieving revision 1.709 diff -u -p -r1.709 parse.y --- sbin/pfctl/parse.y 1 Feb 2021 00:31:04 -0000 1.709 +++ sbin/pfctl/parse.y 29 Sep 2021 18:23:47 -0000 @@ -5170,8 +5170,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: sbin/unwind/parse.y =================================================================== RCS file: /cvs/src/sbin/unwind/parse.y,v retrieving revision 1.27 diff -u -p -r1.27 parse.y --- sbin/unwind/parse.y 31 Aug 2021 20:18:03 -0000 1.27 +++ sbin/unwind/parse.y 29 Sep 2021 18:25:04 -0000 @@ -557,10 +557,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/acme-client/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/acme-client/parse.y,v retrieving revision 1.42 diff -u -p -r1.42 parse.y --- usr.sbin/acme-client/parse.y 14 Sep 2020 16:00:17 -0000 1.42 +++ usr.sbin/acme-client/parse.y 29 Sep 2021 18:28:10 -0000 @@ -594,8 +594,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/bgpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v retrieving revision 1.419 diff -u -p -r1.419 parse.y --- usr.sbin/bgpd/parse.y 1 Sep 2021 12:39:52 -0000 1.419 +++ usr.sbin/bgpd/parse.y 29 Sep 2021 18:29:01 -0000 @@ -3143,8 +3143,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/dvmrpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/dvmrpd/parse.y,v retrieving revision 1.39 diff -u -p -r1.39 parse.y --- usr.sbin/dvmrpd/parse.y 13 Feb 2019 22:57:08 -0000 1.39 +++ usr.sbin/dvmrpd/parse.y 29 Sep 2021 18:31:51 -0000 @@ -421,9 +421,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -516,8 +516,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/eigrpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/eigrpd/parse.y,v retrieving revision 1.31 diff -u -p -r1.31 parse.y --- usr.sbin/eigrpd/parse.y 30 Dec 2020 18:39:57 -0000 1.31 +++ usr.sbin/eigrpd/parse.y 29 Sep 2021 18:36:52 -0000 @@ -760,10 +760,10 @@ findeol(void) static int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/hostapd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/hostapd/parse.y,v retrieving revision 1.61 diff -u -p -r1.61 parse.y --- usr.sbin/hostapd/parse.y 10 May 2019 01:29:31 -0000 1.61 +++ usr.sbin/hostapd/parse.y 29 Sep 2021 18:37:53 -0000 @@ -1447,8 +1447,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/httpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/httpd/parse.y,v retrieving revision 1.125 diff -u -p -r1.125 parse.y --- usr.sbin/httpd/parse.y 10 Apr 2021 10:10:07 -0000 1.125 +++ usr.sbin/httpd/parse.y 29 Sep 2021 18:42:16 -0000 @@ -1564,10 +1564,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/ifstated/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ifstated/parse.y,v retrieving revision 1.55 diff -u -p -r1.55 parse.y --- usr.sbin/ifstated/parse.y 13 Feb 2019 22:57:08 -0000 1.55 +++ usr.sbin/ifstated/parse.y 29 Sep 2021 18:43:02 -0000 @@ -415,9 +415,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -510,8 +510,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/iscsictl/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/iscsictl/parse.y,v retrieving revision 1.18 diff -u -p -r1.18 parse.y --- usr.sbin/iscsictl/parse.y 13 Feb 2019 22:57:08 -0000 1.18 +++ usr.sbin/iscsictl/parse.y 29 Sep 2021 18:43:15 -0000 @@ -495,8 +495,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/ldapd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ldapd/parse.y,v retrieving revision 1.40 diff -u -p -r1.40 parse.y --- usr.sbin/ldapd/parse.y 2 May 2021 14:39:05 -0000 1.40 +++ usr.sbin/ldapd/parse.y 29 Sep 2021 18:44:07 -0000 @@ -598,8 +598,8 @@ findeol(void) int yylex(void) { - u_char buf[4096]; - u_char *p, *val; + char buf[4096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/ldomctl/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ldomctl/parse.y,v retrieving revision 1.23 diff -u -p -r1.23 parse.y --- usr.sbin/ldomctl/parse.y 30 Jan 2021 19:32:44 -0000 1.23 +++ usr.sbin/ldomctl/parse.y 29 Sep 2021 18:45:10 -0000 @@ -413,9 +413,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -508,8 +508,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p; + char buf[8096]; + char *p; int quotec, next, c; int token; Index: usr.sbin/ldpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ldpd/parse.y,v retrieving revision 1.71 diff -u -p -r1.71 parse.y --- usr.sbin/ldpd/parse.y 13 Feb 2019 22:57:08 -0000 1.71 +++ usr.sbin/ldpd/parse.y 29 Sep 2021 18:45:29 -0000 @@ -1074,10 +1074,10 @@ findeol(void) static int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/lpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/lpd/parse.y,v retrieving revision 1.7 diff -u -p -r1.7 parse.y --- usr.sbin/lpd/parse.y 28 Jun 2019 13:32:48 -0000 1.7 +++ usr.sbin/lpd/parse.y 29 Sep 2021 18:36:09 -0000 @@ -277,10 +277,10 @@ lookup(char *s) #define MAXPUSHBACK 128 -unsigned char *parsebuf; -int parseindex; -unsigned char pushback_buffer[MAXPUSHBACK]; -int pushback_index = 0; +char *parsebuf; +int parseindex; +char pushback_buffer[MAXPUSHBACK]; +int pushback_index = 0; int lgetc(int quotec) @@ -370,10 +370,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/npppd/npppd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/npppd/npppd/parse.y,v retrieving revision 1.24 diff -u -p -r1.24 parse.y --- usr.sbin/npppd/npppd/parse.y 27 Feb 2019 04:52:19 -0000 1.24 +++ usr.sbin/npppd/npppd/parse.y 29 Sep 2021 18:49:23 -0000 @@ -1108,9 +1108,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -1203,8 +1203,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p; + char buf[8096]; + char *p; int quotec, next, c; int token; Index: usr.sbin/ntpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ntpd/parse.y,v retrieving revision 1.77 diff -u -p -r1.77 parse.y --- usr.sbin/ntpd/parse.y 11 Apr 2020 07:49:48 -0000 1.77 +++ usr.sbin/ntpd/parse.y 29 Sep 2021 18:50:23 -0000 @@ -561,9 +561,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -656,8 +656,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p; + char buf[8096]; + char *p; int quotec, next, c; int token; Index: usr.sbin/ospf6d/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ospf6d/parse.y,v retrieving revision 1.50 diff -u -p -r1.50 parse.y --- usr.sbin/ospf6d/parse.y 29 Dec 2020 19:44:26 -0000 1.50 +++ usr.sbin/ospf6d/parse.y 29 Sep 2021 18:51:09 -0000 @@ -788,8 +788,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/ospfd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ospfd/parse.y,v retrieving revision 1.103 diff -u -p -r1.103 parse.y --- usr.sbin/ospfd/parse.y 25 Jan 2021 06:16:38 -0000 1.103 +++ usr.sbin/ospfd/parse.y 29 Sep 2021 18:51:51 -0000 @@ -979,8 +979,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/rad/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/rad/parse.y,v retrieving revision 1.18 diff -u -p -r1.18 parse.y --- usr.sbin/rad/parse.y 1 Mar 2021 08:05:40 -0000 1.18 +++ usr.sbin/rad/parse.y 29 Sep 2021 18:52:35 -0000 @@ -579,10 +579,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/radiusd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/radiusd/parse.y,v retrieving revision 1.12 diff -u -p -r1.12 parse.y --- usr.sbin/radiusd/parse.y 1 Apr 2019 11:05:41 -0000 1.12 +++ usr.sbin/radiusd/parse.y 29 Sep 2021 18:54:10 -0000 @@ -450,9 +450,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -545,8 +545,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p; + char buf[8096]; + char *p; int quotec, next, c; int token; Index: usr.sbin/relayd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/relayd/parse.y,v retrieving revision 1.252 diff -u -p -r1.252 parse.y --- usr.sbin/relayd/parse.y 17 Jan 2021 15:17:13 -0000 1.252 +++ usr.sbin/relayd/parse.y 29 Sep 2021 18:54:57 -0000 @@ -2631,8 +2631,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/ripd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ripd/parse.y,v retrieving revision 1.47 diff -u -p -r1.47 parse.y --- usr.sbin/ripd/parse.y 10 May 2019 01:29:31 -0000 1.47 +++ usr.sbin/ripd/parse.y 29 Sep 2021 18:55:44 -0000 @@ -456,9 +456,9 @@ lookup(char *s) #define MAXPUSHBACK 128 -u_char *parsebuf; +char *parsebuf; int parseindex; -u_char pushback_buffer[MAXPUSHBACK]; +char pushback_buffer[MAXPUSHBACK]; int pushback_index = 0; int @@ -551,8 +551,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/smtpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/smtpd/parse.y,v retrieving revision 1.289 diff -u -p -r1.289 parse.y --- usr.sbin/smtpd/parse.y 14 Jun 2021 17:58:15 -0000 1.289 +++ usr.sbin/smtpd/parse.y 29 Sep 2021 18:57:51 -0000 @@ -2859,10 +2859,10 @@ findeol(void) int yylex(void) { - unsigned char buf[8096]; - unsigned char *p, *val; - int quotec, next, c; - int token; + char buf[8096]; + char *p, *val; + int quotec, next, c; + int token; top: p = buf; Index: usr.sbin/snmpd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/snmpd/parse.y,v retrieving revision 1.68 diff -u -p -r1.68 parse.y --- usr.sbin/snmpd/parse.y 2 Sep 2021 05:41:02 -0000 1.68 +++ usr.sbin/snmpd/parse.y 29 Sep 2021 18:58:29 -0000 @@ -1167,8 +1167,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/switchd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/switchd/parse.y,v retrieving revision 1.15 diff -u -p -r1.15 parse.y --- usr.sbin/switchd/parse.y 13 Feb 2019 22:57:08 -0000 1.15 +++ usr.sbin/switchd/parse.y 29 Sep 2021 18:59:05 -0000 @@ -419,8 +419,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/vmd/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/vmd/parse.y,v retrieving revision 1.58 diff -u -p -r1.58 parse.y --- usr.sbin/vmd/parse.y 16 Jun 2021 16:55:02 -0000 1.58 +++ usr.sbin/vmd/parse.y 29 Sep 2021 18:59:42 -0000 @@ -930,8 +930,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; Index: usr.sbin/ypldap/parse.y =================================================================== RCS file: /cvs/src/usr.sbin/ypldap/parse.y,v retrieving revision 1.33 diff -u -p -r1.33 parse.y --- usr.sbin/ypldap/parse.y 13 Feb 2019 22:57:08 -0000 1.33 +++ usr.sbin/ypldap/parse.y 29 Sep 2021 19:00:32 -0000 @@ -605,8 +605,8 @@ findeol(void) int yylex(void) { - u_char buf[8096]; - u_char *p, *val; + char buf[8096]; + char *p, *val; int quotec, next, c; int token; -- Christian "naddy" Weisgerber na...@mips.inka.de