~evan/bitart

6269c4d47ad98829dc716583a834406e2394ee73 — Evan Johnston 11 months ago 61b35fe
add defaults to switch statements to silence warnings
1 files changed, 3 insertions(+), 0 deletions(-)

M main.c
M main.c => main.c +3 -0
@@ 88,6 88,7 @@ eval(char *program, unsigned int x, unsigned int y, unsigned int *stack)
		case HEIGHT: push(height); continue;
		case WIDTH: push(width); continue;
		case LIT: push(t.data); continue;
		default: break;
		};
		if (--sp < stack) goto error;
		unsigned int b = *sp;


@@ 97,6 98,7 @@ eval(char *program, unsigned int x, unsigned int y, unsigned int *stack)
		/* shhhhhhhh it's fine portability is overrated */
		case COUNT: push(__builtin_popcount(b)); continue;
		case DUP: push(b); push(b); continue;
		default: break;
		};
		if (--sp < stack) goto error;
		unsigned int a = *sp;


@@ 125,6 127,7 @@ eval(char *program, unsigned int x, unsigned int y, unsigned int *stack)
		case SWAP: push(b); push(a); continue;
		case LEFT: push(a << b); continue;
		case RIGHT: push(b >> b); continue;
		default: break;
		}
	}
	return sp;