ref: 80244a46e09e3ce670be5c94ecc836659bff404c
parent: d31abf3c36b0f84085c78a35791d8a25cb941da3
author: Roberto E. Vargas Caballero <[email protected]>
date: Tue Jun 12 17:05:19 EDT 2012
Convert next in void function The value returned by next is used only in a place, so it is better convert it into void value and modify the place where return value is used.
--- a/decl.c
+++ b/decl.c
@@ -205,7 +205,8 @@
for (bp = qlf; yytoken == '*' && bp != lim; ++bp) {
*bp = 0;
repeat_qlf:
- switch (next()) {
+ next();
+ switch (yytoken) {
case CONST:
if (!(*bp ^= T_CONST))
goto duplicated;
--- a/lex.c
+++ b/lex.c
@@ -128,7 +128,7 @@
}
}
-unsigned char next(void)
+void next(void)
{
register unsigned char c;
--- a/tokens.h
+++ b/tokens.h
@@ -48,7 +48,7 @@
extern void init_lex(void);
-extern unsigned char next(void);
+extern void next(void);
extern char accept(unsigned char tok);
extern void expect(unsigned char tok);
extern void init_keywords(void);