commit 6c713772cdd55b64dbe15e06fb75da058a606cec
parent d34851144fe8a99cb3a5fb5e11ef746ef5385d68
Author: Naveen Narayanan <zerous@nocebo.space>
Date: Fri, 26 Jul 2024 00:48:06 +0200
Use -Wall/Werror
Fix compilation errors
Diffstat:
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/8.c b/8.c
@@ -12,7 +12,6 @@
#include "av.h"
-#define BUFSZ 256
#define START 0x200
uint16_t opcode;
@@ -26,8 +25,6 @@ uint8_t soundtmr;
uint16_t stack[16];
uint16_t *sp = stack;
uint8_t keys[16];
-uint8_t buf[BUFSZ];
-uint8_t bit[8];
uint8_t fnt[80] =
{
@@ -52,9 +49,8 @@ uint8_t fnt[80] =
static void
init(int fd, size_t sz)
{
- size_t r, t;
+ size_t r;
- t = sz;
mem = malloc(4096);
if (mem == NULL)
err(1, "malloc failed");
@@ -331,8 +327,6 @@ die(void)
static void
cycle()
{
- static int n;
-
opcode = mem[pc] << 8 | mem[pc + 1];
//fprintf(stderr, "opc: 0x%hx\n", opcode);
execute();
diff --git a/config.mk b/config.mk
@@ -3,7 +3,7 @@ PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
CFLAGS = -g
-CPPFLAGS = -I/usr/include/SDL2 -I/usr/include/glib-2.0 \
+CPPFLAGS = -Wall -Werror -I/usr/include/SDL2 -I/usr/include/glib-2.0 \
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include \
-I/usr/include/opus -I/usr/include/x86_64-linux-gnu \
-I/usr/include/dbus-1.0 \