Skip to content

pawnc reports wrong filenames and line numbers on warning number 203 & 213 #732

Open
@Zorono

Description

@Zorono

Issue description:

when there is a unused variable and tag mismatch in a file which is included in multiple areas
while I didn't use LABEL::Data yet or even that iterator labels

in main.pwn: #include "./structure/main.inc"
in main.inc: #include "helpers/labels.inc"
in labels.inc:

#define LABEL:: lbl_
#define MAX_LABELS (700)
enum LabelData
{
    ID,
    Text3D:Label,
    Text[150],
    Color,
    Interior,
    VirtualWorld,
    Float:PosX,
    Float:PosY,
    Float:PosZ
};
new LABEL::Data[MAX_LABELS][LabelData],
    Iterator:Labels<MAX_LABELS>,
  • observed behavior
    it reports
structure/main.inc(26740) : warning 213: tag mismatch: expected tags "T_WEAPON", "Float", or none ("_"); but found "LabelData"
structure/main.inc(26741) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26741) : warning 213: tag mismatch: expected tag "LabelData", but found none ("_")
structure/main.inc(26743) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26744) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26748) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26750) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26753) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26754) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26755) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26758) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26759) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26760) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
structure/main.inc(26762) : warning 213: tag mismatch: expected tag none ("_"), but found "LabelData"
main.pwn(48) : warning 203: symbol is never used: "Labels@YSII_Ag"
main.pwn(48) : warning 203: symbol is never used: "Labels@YSII_Cg"
main.pwn(47) : warning 203: symbol is never used: "lbl_Data"

which is wrong filenames and line numbers...

Workspace Information:

  • Compiler version: 3.10.11
  • Command line arguments provided (or sampctl version):
pawncc.exe main.pwn -;+ -(+ -d3 -O0 -Z+ -C+ -t4 -D"Z:\path\to\Server\gamemodes" -o"Z:\path\to\gamemodes\main.amx" -i"Z:\path\to\dependencies" -i"Z:\path\to\dependencies\openmultiplayer"
  • Operating System: Windows 10 Pro (x64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions