commit e63bf1fbae3e21f5082b094c27929e111be5073d from: Omar Polo date: Tue Nov 30 19:03:38 2021 UTC backport type change for parse.y Don't declare variables as "unsigned char *" that are passed to functions that take "char *" arguments. Where such chars are assigned to int or passed to ctype functions, explicitly cast them to unsigned char. For OpenBSD' clang, -Wpointer-sign has been disabled by default, but when the parse.y code was built elsewhere, the compiler would complain. (originally by naddy@ for various parse.y in the tree) commit - 36da9bee5bd42c389b2791dbb21fd09ea19bf308 commit + e63bf1fbae3e21f5082b094c27929e111be5073d blob - 11c5c2f5e0bd5cf383edf69b4e33790b9b0db5d6 blob + b962982a479b2f95d22ec1bea62cfd0c31f972ba --- parse.y +++ parse.y @@ -538,10 +538,10 @@ int yylex(void) #endif { - 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; @@ -577,7 +577,7 @@ top: p = val + strlen(val) - 1; lungetc(DONE_EXPAND); while (p >= val) { - lungetc(*p); + lungetc((unsigned char)*p); p--; } lungetc(START_EXPAND); @@ -653,8 +653,8 @@ top: } else { nodigits: while (p > buf + 1) - lungetc(*--p); - c = *--p; + lungetc((unsigned char)*--p); + c = (unsigned char)*--p; if (c == '-') return c; }