diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2021-10-15 15:01:30 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2021-10-15 15:01:30 +0000 |
commit | 1962f7440266854ff99ccbcccdb8901d4a390f3b (patch) | |
tree | a370187304af1b3e92149ae0b83ab036b229cba8 /usr.sbin/acme-client | |
parent | 419d75fa85d117d2faff0336cca5f20917cc3bfb (diff) |
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's clang, -Wpointer-sign has been disabled by default,
but when the parse.y code was built elsewhere, the compiler would
complain.
With help from millert@
ok benno@ deraadt@
Diffstat (limited to 'usr.sbin/acme-client')
-rw-r--r-- | usr.sbin/acme-client/parse.y | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/acme-client/parse.y b/usr.sbin/acme-client/parse.y index 1febcb10a3a..e09c2283ad4 100644 --- a/usr.sbin/acme-client/parse.y +++ b/usr.sbin/acme-client/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.42 2020/09/14 16:00:17 florian Exp $ */ +/* $OpenBSD: parse.y,v 1.43 2021/10/15 15:01:27 naddy Exp $ */ /* * Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv> @@ -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; @@ -633,7 +633,7 @@ top: p = val + strlen(val) - 1; lungetc(DONE_EXPAND); while (p >= val) { - lungetc(*p); + lungetc((unsigned char)*p); p--; } lungetc(START_EXPAND); @@ -709,8 +709,8 @@ top: } else { nodigits: while (p > buf + 1) - lungetc(*--p); - c = *--p; + lungetc((unsigned char)*--p); + c = (unsigned char)*--p; if (c == '-') return c; } |