about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2013-12-06 23:16:54 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2013-12-06 23:16:54 +0100
commit27513daee2061a5f3e05ae5fef8f83f15a3c9438 (patch)
treef79a9214d9045e12971f9a1cf7b44c257f1a4e58
parent873763f4c6a4369d703274a279296200bfd271a2 (diff)
downloadcwm-27513daee2061a5f3e05ae5fef8f83f15a3c9438.tar.gz
cwm-27513daee2061a5f3e05ae5fef8f83f15a3c9438.tar.xz
cwm-27513daee2061a5f3e05ae5fef8f83f15a3c9438.zip
Revert "use u_char for buffers in yylex"
This reverts commit 03b19f1487135d8e8a80e0aad5aef447776c7c11.

This merely generates pointer signedness warnings for strtonum() and
lookup() and problems with the const char * prototype of xstrdup().
-rw-r--r--parse.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 43499fe..0178092 100644
--- a/parse.y
+++ b/parse.y
@@ -288,9 +288,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
@@ -383,8 +383,8 @@ findeol(void)
 int
 yylex(void)
 {
-	u_char	 buf[8096];
-	u_char	*p;
+	char	 buf[8096];
+	char	*p;
 	int	 quotec, next, c;
 	int	 token;
 
@@ -425,7 +425,7 @@ yylex(void)
 				yyerror("string too long");
 				return (findeol());
 			}
-			*p++ = c;
+			*p++ = (char)c;
 		}
 		yylval.v.string = xstrdup(buf);
 		return (STRING);