aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Holstein <nathan.holstein@gmail.com>2015-08-02 12:13:47 -0400
committerNathan Holstein <nathan.holstein@gmail.com>2015-08-05 08:50:06 -0400
commit18b4161e2a80d9367477194085d52c61ab6eb5b0 (patch)
treec0be2993070a688acf7a052a50a7a22ee2dce3fe
parente1f898280487cd0972021b8e6a937f9597cb6ce9 (diff)
downloadopendoas-18b4161e2a80d9367477194085d52c61ab6eb5b0.tar.gz
Fix a sign comparison warning.
The 'i' variable was only used in this loop, so move it locally and change its type to unsigned.
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 7454f85..7b1b45a 100644
--- a/parse.y
+++ b/parse.y
@@ -203,7 +203,7 @@ int
yylex(void)
{
char buf[1024], *ebuf, *p, *str;
- int i, c, quotes = 0, escape = 0, qpos = -1, nonkw = 0;
+ int c, quotes = 0, escape = 0, qpos = -1, nonkw = 0;
p = buf;
ebuf = buf + sizeof(buf);
@@ -306,6 +306,7 @@ eow:
goto repeat;
}
if (!nonkw) {
+ unsigned i;
for (i = 0; i < sizeof(keywords) / sizeof(keywords[0]); i++) {
if (strcmp(buf, keywords[i].word) == 0)
return keywords[i].token;