check_duplicates() is local to evaluate.c and only called via evaluate_symbol_list(). However, typedefs need exactly the same check logic. So, make check_duplicates() extern so that it can also be used directly in other files. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- evaluate.c | 2 +- symbol.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/evaluate.c b/evaluate.c index 0d50220a6..ab4d1ba6f 100644 --- a/evaluate.c +++ b/evaluate.c @@ -3291,7 +3291,7 @@ struct symbol *evaluate_expression(struct expression *expr) return NULL; } -static void check_duplicates(struct symbol *sym) +void check_duplicates(struct symbol *sym) { int declared = 0; struct symbol *next = sym; diff --git a/symbol.h b/symbol.h index dc6de8fa4..d7e5806a9 100644 --- a/symbol.h +++ b/symbol.h @@ -311,6 +311,7 @@ extern const char* get_type_name(enum type type); extern void debug_symbol(struct symbol *); extern void merge_type(struct symbol *sym, struct symbol *base_type); extern void check_declaration(struct symbol *sym); +extern void check_duplicates(struct symbol *sym); static inline int valid_type(const struct symbol *ctype) { -- 2.16.3 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html