mirror of
https://xff.cz/git/pinephone-keyboard
synced 2024-12-21 20:38:48 -05:00
Compile with -Wall and fix issues this revealed
This commit is contained in:
parent
457e5658d9
commit
a4ca2223e1
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ VERSION := $(shell git describe) $(shell git log -1 --format=%cd --date=iso)
|
||||
|
||||
OUT ?= build/
|
||||
CFLAGS ?= -O2 -g0
|
||||
CFLAGS += -DVERSION="\"$(VERSION)\"" -I. -I$(OUT)
|
||||
CFLAGS += -DVERSION="\"$(VERSION)\"" -I. -I$(OUT) -Wall -Wno-unused-variable -Wno-unused-function
|
||||
|
||||
all: $(OUT)ppkb-i2c-inputd $(OUT)ppkb-usb-flasher $(OUT)ppkb-usb-debugger $(OUT)fw-stock.bin $(OUT)ppkb-i2c-debugger $(OUT)ppkb-i2c-charger-ctl $(OUT)ppkb-i2c-flasher $(OUT)ppkb-i2c-selftest
|
||||
|
||||
|
3
common.c
3
common.c
@ -46,6 +46,7 @@ static void syscall_error(int is_err, const char* fmt, ...)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
__attribute__((noreturn))
|
||||
static void error(const char* fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
@ -84,7 +85,7 @@ static bool read_file(const char* path, char* buf, size_t size)
|
||||
|
||||
static int open_usb_dev(uint16_t vid, uint16_t pid)
|
||||
{
|
||||
char path[256], buf[256];
|
||||
char path[512], buf[256];
|
||||
struct dirent *e;
|
||||
unsigned e_vid, e_pid, bus, dev;
|
||||
int fd = -1, ret;
|
||||
|
Loading…
Reference in New Issue
Block a user