Deal with compiler warnings.

This commit is contained in:
Andrew Alderwick 2022-06-07 19:39:43 +01:00
parent 0fafd652f1
commit 0ff2a3586d
1 changed files with 4 additions and 5 deletions

View File

@ -183,10 +183,10 @@ makereference(char *scope, char *label, Uint16 addr)
if(label[1] == '&') if(label[1] == '&')
scpy(sublabel(subw, scope, label + 2), r->name, 0x40); scpy(sublabel(subw, scope, label + 2), r->name, 0x40);
else { else {
int p = spos(label + 1, '/'); int pos = spos(label + 1, '/');
if(p > 0) { if(pos > 0) {
Label *l; Label *l;
if((l = findlabel(scpy(label + 1, parent, p)))) if((l = findlabel(scpy(label + 1, parent, pos))))
l->refs++; l->refs++;
} }
scpy(label + 1, r->name, 0x40); scpy(label + 1, r->name, 0x40);
@ -352,9 +352,8 @@ parse(char *w, FILE *f)
if(!writebyte(c)) return 0; if(!writebyte(c)) return 0;
break; break;
case '[': case '[':
if(slen(w) == 1) break; /* else FALLTHROUGH */
case ']': case ']':
if(slen(w) == 1) break; /* else FALLTHROUGH */ if(slen(w) == 1) break; /* else fallthrough */
default: default:
/* opcode */ /* opcode */
if(findopcode(w) || scmp(w, "BRK", 4)) { if(findopcode(w) || scmp(w, "BRK", 4)) {