diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2016-11-02 23:11:13 +0100 |
|---|---|---|
| committer | Christopher Li <sparse@chrisli.org> | 2017-02-13 09:34:43 +0800 |
| commit | bb33d4ecc3446248617d4d2f66868c46635ce497 (patch) | |
| tree | 5db7672bfaff364a67aa9540ad71b7ac38c1a3ea /evaluate.c | |
| parent | f25e41f4856b800d41a5d97122ed881a261deb50 (diff) | |
| download | sparse-dev-bb33d4ecc3446248617d4d2f66868c46635ce497.tar.gz | |
Remove unneeded variable in integer_promotion()
Following some previous simplification done on the function,
the variable 'orig_type' is now always the same as 'type'.
To avoid possible confusion, only use 'type' and remove
the declaration of 'orig_type'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'evaluate.c')
| -rw-r--r-- | evaluate.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -117,7 +117,6 @@ static struct symbol *evaluate_string(struct expression *expr) /* type has come from classify_type and is an integer type */ static inline struct symbol *integer_promotion(struct symbol *type) { - struct symbol *orig_type = type; unsigned long mod = type->ctype.modifiers; int width = type->bit_size; @@ -128,7 +127,6 @@ static inline struct symbol *integer_promotion(struct symbol *type) */ if (type->type == SYM_BITFIELD) { type = type->ctype.base_type; - orig_type = type; } mod = type->ctype.modifiers; if (width < bits_in_int) @@ -140,7 +138,7 @@ static inline struct symbol *integer_promotion(struct symbol *type) return &uint_ctype; return &int_ctype; } - return orig_type; + return type; } /* |
