ref: 197f1e9b7ba9a0ad1c240db1a98bfab5cb7db703
parent: 7063f66b2d628c519e11a7a3bddb538f6bc7e6dc
parent: f7c2665e14e03499f8b361e2a02834e45f6b01f9
author: Eldred Habert <[email protected]>
date: Wed Nov 6 03:34:37 EST 2019
Merge pull request #444 from ISSOtm/fix_develop Fix errors in `make develop`
--- a/Makefile
+++ b/Makefile
@@ -215,7 +215,7 @@
develop:
$Qenv make -j WARNFLAGS="-Werror -Wall -Wextra -Wpedantic \
- -Wno-sign-compare -Wformat=2 -Wformat-overflow=2 \
+ -Wno-sign-compare -Wformat -Wformat-security -Wformat-overflow=2 \
-Wformat-truncation=1 -Wformat-y2k -Wswitch-enum -Wunused \
-Wuninitialized -Wunknown-pragmas -Wstrict-overflow=5 \
-Wstringop-overflow=4 -Walloc-zero -Wduplicated-cond \
--- a/include/gfx/main.h
+++ b/include/gfx/main.h
@@ -66,8 +66,8 @@
uint8_t **data;
struct RGBColor *palette;
int num_colors;
- int width;
- int height;
+ unsigned int width;
+ unsigned int height;
};
struct GBImage {
--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -116,7 +116,7 @@
strncpy(dest, write_ptr, maxLength + 1);
} else {
fullLength = snprintf(dest, maxLength + 1,
- mode ? : "$%X",
+ mode ? mode : "$%X",
value);
}
@@ -137,7 +137,7 @@
int32_t i;
uint32_t r = 0;
- i = ((length - 4) < 0) ? 0 : length - 4;
+ i = length < 4 ? 0 : length - 4;
while (i < length) {
r <<= 8;
r |= (uint8_t)s[i];
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -371,7 +371,7 @@
if (i == -1)
i = MAXMACROARGS + 1;
- assert(i - 1 >= 0);
+ assert(i >= 1);
assert((size_t)(i - 1)
< sizeof(currentmacroargs) / sizeof(*currentmacroargs));