mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-25 07:15:12 +00:00
fix all the warnings
This commit is contained in:
parent
f3bc19a3e7
commit
1e9795e179
2 changed files with 6 additions and 6 deletions
|
@ -58,7 +58,7 @@ uxn_eval(Uint16 pc)
|
||||||
/* L2r */ case 0xe0: INC(rst) = uxn.ram[pc++];
|
/* L2r */ case 0xe0: INC(rst) = uxn.ram[pc++];
|
||||||
/* LIr */ case 0xc0: INC(rst) = uxn.ram[pc++]; break;
|
/* LIr */ case 0xc0: INC(rst) = uxn.ram[pc++]; break;
|
||||||
/* INC */ OPC(0x01, POx(a), PUx(a + 1))
|
/* INC */ OPC(0x01, POx(a), PUx(a + 1))
|
||||||
/* POP */ OPC(0x02, REM, 0)
|
/* POP */ OPC(0x02, REM, {})
|
||||||
/* NIP */ OPC(0x03, GET(x) REM,PUT(x))
|
/* NIP */ OPC(0x03, GET(x) REM,PUT(x))
|
||||||
/* SWP */ OPC(0x04, GET(x) GET(y),PUT(x) PUT(y))
|
/* SWP */ OPC(0x04, GET(x) GET(y),PUT(x) PUT(y))
|
||||||
/* ROT */ OPC(0x05, GET(x) GET(y) GET(z),PUT(y) PUT(x) PUT(z))
|
/* ROT */ OPC(0x05, GET(x) GET(y) GET(z),PUT(y) PUT(x) PUT(z))
|
||||||
|
|
10
src/uxnasm.c
10
src/uxnasm.c
|
@ -61,7 +61,7 @@ static int parse(char *w, FILE *f, Context *ctx);
|
||||||
static char *
|
static char *
|
||||||
push(char *s, char c)
|
push(char *s, char c)
|
||||||
{
|
{
|
||||||
char *d = dict;
|
char *d;
|
||||||
for(d = dict; d < dictnext; d++) {
|
for(d = dict; d < dictnext; d++) {
|
||||||
char *ss = s, *dd = d, a, b;
|
char *ss = s, *dd = d, a, b;
|
||||||
while((a = *dd++) == (b = *ss++))
|
while((a = *dd++) == (b = *ss++))
|
||||||
|
@ -126,7 +126,7 @@ walkmacro(Item *m, Context *ctx)
|
||||||
char *dataptr = m->data, *_token = token;
|
char *dataptr = m->data, *_token = token;
|
||||||
while((c = *dataptr++)) {
|
while((c = *dataptr++)) {
|
||||||
if(c < 0x21) {
|
if(c < 0x21) {
|
||||||
*_token++ = 0x00;
|
*_token = 0x00;
|
||||||
if(token[0] && !parse(token, NULL, ctx)) return 0;
|
if(token[0] && !parse(token, NULL, ctx)) return 0;
|
||||||
_token = token;
|
_token = token;
|
||||||
} else if(_token - token < 0x2f)
|
} else if(_token - token < 0x2f)
|
||||||
|
@ -144,7 +144,7 @@ walkfile(FILE *f, Context *ctx)
|
||||||
char *_token = token;
|
char *_token = token;
|
||||||
while(f && fread(&c, 1, 1, f)) {
|
while(f && fread(&c, 1, 1, f)) {
|
||||||
if(c < 0x21) {
|
if(c < 0x21) {
|
||||||
*_token++ = 0x00;
|
*_token = 0x00;
|
||||||
if(token[0] && !parse(token, f, ctx)) return 0;
|
if(token[0] && !parse(token, f, ctx)) return 0;
|
||||||
if(c == 0xa) ctx->line++;
|
if(c == 0xa) ctx->line++;
|
||||||
_token = token;
|
_token = token;
|
||||||
|
@ -153,7 +153,7 @@ walkfile(FILE *f, Context *ctx)
|
||||||
else
|
else
|
||||||
return error_asm("Token size exceeded");
|
return error_asm("Token size exceeded");
|
||||||
}
|
}
|
||||||
*_token++ = 0;
|
*_token = 0;
|
||||||
return parse(token, f, ctx);
|
return parse(token, f, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ static int
|
||||||
assemble(char *filename)
|
assemble(char *filename)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int res = 0;
|
int res;
|
||||||
Context ctx;
|
Context ctx;
|
||||||
ctx.line = 1;
|
ctx.line = 1;
|
||||||
ctx.path = push(filename, 0);
|
ctx.path = push(filename, 0);
|
||||||
|
|
Loading…
Reference in a new issue