-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
It seems that if some label is not referenced by script jump or "local" header, it would be incorrectly treated as "unused label" -- even if it is referenced by "non-local" headers.
.headerstart ...
CommonAttk1: ...
.headerstart ...
GndAttkInit CommonAttk1
# CommonAttk1 is treated as unused label
It is more than a bogus warning, since IScriptBIN then removes the label and script block, leading to iscript.bin generation failure.
PyMS/PyMS/FileFormats/IScriptBIN.py
Lines 860 to 875 in 03a714b
| elif state == 3: | |
| if len(header[3]) == ENTRY_TYPES[header[1]]: | |
| raise PyMSError('Interpreting', 'Expected ".headerend"',n,line, warnings=warnings) | |
| m = re.match('\\A(\\S+)\\s+(\\S+)\\s*\\Z',line) | |
| if not m.group(1) in HEADER[len(header[3])]: | |
| raise PyMSError('Interpreting', 'Expected "%s" header descriptor' % HEADER[len(header[3])][0],n,line, warnings=warnings) | |
| label = m.group(2) | |
| if label in labels: | |
| header[3].append(labels[label]) | |
| else: | |
| if label != '[NONE]': | |
| if not label in findlabels: | |
| findlabels[label] = [(header,len(header[3]))] | |
| else: | |
| findlabels[label].append((header,len(header[3]))) | |
| header[3].append(None) |
IMO there should be some code under state==header to remove label from unused, but there isn't.
Metadata
Metadata
Assignees
Labels
No labels