uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit c5a5eaff0e17f35cc11b0f90133cce4af3315554
parent 9d6587ffa5ad0e3b8dd66067c57c3eb1619d6a7e
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date:   Tue, 26 Mar 2024 21:56:50 -0700

(uxnasm) Quieted warning

Diffstat:
Msrc/uxnasm.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uxnasm.c b/src/uxnasm.c @@ -64,7 +64,7 @@ static int shex(char *s) { int n = 0; char c; while((c = *s++)) { n = n << 4, static int scmp(char *a, char *b, int len) { int i = 0; while(a[i] == b[i]) if(!a[i] || ++i >= len) return 1; return 0; } /* str compare */ static int slen(char *s) { int i = 0; while(s[i]) i++; return i; } /* str length */ static char *scpy(char *src, char *dst, int len) { int i = 0; while((dst[i] = src[i]) && i < len - 2) i++; dst[i + 1] = '\0'; return dst; } /* str copy */ -static char *scat(char *dst, const char *src) { char *ptr = dst + slen(dst); while(*src) *ptr++ = *src++; *ptr = '\0'; return dst; } /* str cat */ +static char *scat(char *dst, char *src) { char *ptr = dst + slen(dst); while(*src) *ptr++ = *src++; *ptr = '\0'; return dst; } /* str cat */ #define isopcode(x) (findopcode(x) || scmp(x, "BRK", 4)) #define writeshort(x) (writebyte(x >> 8) && writebyte(x & 0xff)) @@ -203,7 +203,7 @@ static char * makesublabel(char *buf, char *name) { if(slen(scope) + slen(name) >= 0x3f) { - error_asm("Sublabel length too long"); + (void)error_asm("Sublabel length too long"); return NULL; } return scat(scat(scpy(scope, buf, 0x40), "/"), name);