summaryrefslogtreecommitdiff
path: root/usr.sbin/ypldap
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2021-10-15 15:01:30 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2021-10-15 15:01:30 +0000
commit1962f7440266854ff99ccbcccdb8901d4a390f3b (patch)
treea370187304af1b3e92149ae0b83ab036b229cba8 /usr.sbin/ypldap
parent419d75fa85d117d2faff0336cca5f20917cc3bfb (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/ypldap')
-rw-r--r--usr.sbin/ypldap/parse.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y
index b5aa523abae..32ca3da3e97 100644
--- a/usr.sbin/ypldap/parse.y
+++ b/usr.sbin/ypldap/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.33 2019/02/13 22:57:08 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.34 2021/10/15 15:01:29 naddy Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -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;
@@ -644,7 +644,7 @@ top:
p = val + strlen(val) - 1;
lungetc(DONE_EXPAND);
while (p >= val) {
- lungetc(*p);
+ lungetc((unsigned char)*p);
p--;
}
lungetc(START_EXPAND);
@@ -720,8 +720,8 @@ top:
} else {
nodigits:
while (p > buf + 1)
- lungetc(*--p);
- c = *--p;
+ lungetc((unsigned char)*--p);
+ c = (unsigned char)*--p;
if (c == '-')
return (c);
}