summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-21 00:48:16 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-21 00:56:25 +0100
commitaa654d8ef3344f0f0b7ab2998b8d915dc5fcb8cf (patch)
tree5a4bbd4c08ac9af04ac929212927f6cec317ef88
parent112845e7cc227664f3a11f35d2885791b7d49a2a (diff)
downloadsparse-aa654d8ef3344f0f0b7ab2998b8d915dc5fcb8cf.tar.gz
remove self-assignment of base_type
The parsing of enums contains a self-assignment to base_type. But this self-assignment doesn't show very clearly that the variable doesn't need to change and that some compilers complain. So, replace that self-assignment by a null statement. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 4784ff57..79543432 100644
--- a/parse.c
+++ b/parse.c
@@ -995,7 +995,7 @@ static struct token *parse_enum_declaration(struct token *token, struct symbol *
base_type = &bad_ctype;
}
else if (!is_int_type(base_type))
- base_type = base_type;
+ ;
else if (type_is_ok(&uint_ctype, range))
base_type = &uint_ctype;
else if (type_is_ok(&int_ctype, range))