From bf81d071139e978a4642ada6134b81a4ab188c34 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 6 Jun 2022 07:57:29 -0700 Subject: [PATCH] (uxnasm)Quiet label warnings with sublabels --- src/uxnasm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/uxnasm.c b/src/uxnasm.c index e5e6a35..69d7b43 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -308,6 +308,7 @@ parse(char *w, FILE *f) case '&': /* sublabel */ if(!makelabel(sublabel(subw, p.scope, w + 1))) return error("Invalid sublabel", w); + findlabel(p.scope)->refs++; litlast = 0; break; case '#': /* literals hex */ @@ -343,8 +344,10 @@ parse(char *w, FILE *f) while((c = w[++i])) if(!writebyte(c)) return 0; break; - case '[': if (slen(w) == 1) break; /* else FALLTHROUGH */ - case ']': if (slen(w) == 1) break; /* else FALLTHROUGH */ + case '[': + if(slen(w) == 1) break; /* else FALLTHROUGH */ + case ']': + if(slen(w) == 1) break; /* else FALLTHROUGH */ default: /* opcode */ if(findopcode(w) || scmp(w, "BRK", 4)) {