lupyuen / pinetime-updater

Flash firmware to PineTime the friendly wired way with OpenOCD
Apache License 2.0
65 stars 10 forks source link

Comile errors as all all warnings being treated as errors #13

Closed bmsleight closed 1 year ago

bmsleight commented 1 year ago

PR to follow with fresh raspbian install on Raspberry PI 1

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -I./jimtcl -I./jimtcl -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -MT src/flash/nor/jtagspi.lo -MD -MP -MF src/flash/nor/.deps/jtagspi.Tpo -c src/flash/nor/jtagspi.c -o src/flash/nor/jtagspi.o In file included from ./src/flash/common.h:21, from src/flash/nor/core.h:25, from src/flash/nor/imp.h:22, from src/flash/nor/jtagspi.c:22: src/flash/nor/jtagspi.c: In function ‘jtagspi_write_enable’: ./src/helper/log.h:133:2: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 133 | log_printf_lf(LOG_LVL_ERROR, __FILE__, __LINE__, __func__, expr) | ^~~~~~~~~~~~~ src/flash/nor/jtagspi.c:262:11: note: ‘status’ was declared here 262 | uint32_t status; | ^~~~~~ src/flash/nor/jtagspi.c: In function ‘jtagspi_wait’: src/flash/nor/jtagspi.c:249:15: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 249 | if ((status & SPIFLASH_BSY_BIT) == 0) { | ~~~~~~~~^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors

lupyuen commented 1 year ago

Merged. Thanks! :-)