compiler
compiler copied to clipboard
Unused var warning wrong file name
Issue description:
When compiling script with local includes (modules), unused variable warning returns correct line in file where its defined, but wrong file name. It returns entry (parent) file.
Minimal complete verifiable example (MCVE):
test.pwn (these is the one you should compile)
#include <a_samp>
#include <fixes>
#include "test2.pwn"
main()
{
}
test2.pwn
new myUnusedVar;
Returned warning/error is: test.pwn(1) : warning 203: symbol is never used: "myUnusedVar"
As you can see, file is test.pwn, but it should be test2.pwn while line number 1 is correct. If you add empty lines before myUnusedVar, it will count them and return correct line (and still wrong file name/path).
Workspace Information:
- Compiler version: Pawn compiler 3.10.10
- Command line arguments provided (or sampctl version): vscode tasks relevant config:
"command": "${workspaceRoot}/pawno/pawncc.exe",
"args": ["${file}", "-D${relativeFileDirname}", "-;+", "-(+", "-d3"],
Actual output from compiler
> Executing task: ""C:\Users\Ice\Desktop\DayZ Server/pawno/pawncc.exe" "C:\Users\Ice\Desktop\DayZ Server\gamemodes\test.pwn" -Dgamemodes -;+ -(+ -d3" <
- Operating System: Windows 7 Ultimate SP1 x64
This issue has been automatically marked as stale because it has not had recent activity.