sourcepawn
sourcepawn copied to clipboard
Static functions called by stock functions now report "symbol is never used" warnings
Using the SourcePawn Compiler 1.12.0.7140, static functions will now report "symbol is never used" warnings if the stock they are referenced in is not used in the plugin. I'm not sure if this is the intended behavior now, but it doesn't make much sense in my opinion.
static void SomeHelperFunction()
{
PrintToServer("I'm helping!");
}
stock void HelpMe()
{
SomeHelperFunction();
}
Output:
spcomptest.sp(1) : warning 203: symbol is never used: "SomeHelperFunction"
1 | static void SomeHelperFunction()
---------------------^
In an include, this should not be an error.
In an include, this should not be an error.
The warning does show up in includes.
test.inc
static void SomeHelperFunction()
{
PrintToServer("I'm helping!");
}
stock void HelpMe()
{
SomeHelperFunction();
}
test.sp
#include <test>
public void OnPluginStart() {}