Commit 4f729896 authored by Benoît Minisini's avatar Benoît Minisini

Unused function warnings now point at the beginning of the function.

[COMPILER]
* BUG: Unused function warnings now point at the beginning of the function.
parent 019bae27
......@@ -239,7 +239,7 @@ void CLASS_check_unused_global(CLASS *class)
if (TYPE_get_kind(type) == TK_VARIABLE)
COMPILE_print(MSG_WARNING, sym->global.line, "unused global variable: &1", SYMBOL_get_name(&sym->symbol));
else if (TYPE_get_kind(type) == TK_FUNCTION)
COMPILE_print(MSG_WARNING, sym->global.line, "unused function: &1", SYMBOL_get_name(&sym->symbol));
COMPILE_print(MSG_WARNING, class->function[sym->global.value].line - 1, "unused function: &1", SYMBOL_get_name(&sym->symbol));
else if (TYPE_get_kind(type) == TK_EXTERN)
COMPILE_print(MSG_WARNING, sym->global.line, "unused extern function: &1", SYMBOL_get_name(&sym->symbol));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment