mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Fix errors in make develop
This commit is contained in:
2
Makefile
2
Makefile
@@ -214,7 +214,7 @@ wwwman:
|
|||||||
|
|
||||||
develop:
|
develop:
|
||||||
$Qenv make -j WARNFLAGS="-Werror -Wall -Wextra -Wpedantic \
|
$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 \
|
-Wformat-truncation=1 -Wformat-y2k -Wswitch-enum -Wunused \
|
||||||
-Wuninitialized -Wunknown-pragmas -Wstrict-overflow=5 \
|
-Wuninitialized -Wunknown-pragmas -Wstrict-overflow=5 \
|
||||||
-Wstringop-overflow=4 -Walloc-zero -Wduplicated-cond \
|
-Wstringop-overflow=4 -Walloc-zero -Wduplicated-cond \
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ struct RawIndexedImage {
|
|||||||
uint8_t **data;
|
uint8_t **data;
|
||||||
struct RGBColor *palette;
|
struct RGBColor *palette;
|
||||||
int num_colors;
|
int num_colors;
|
||||||
int width;
|
unsigned int width;
|
||||||
int height;
|
unsigned int height;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GBImage {
|
struct GBImage {
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ size_t symvaluetostring(char *dest, size_t maxLength, char *sym,
|
|||||||
strncpy(dest, write_ptr, maxLength + 1);
|
strncpy(dest, write_ptr, maxLength + 1);
|
||||||
} else {
|
} else {
|
||||||
fullLength = snprintf(dest, maxLength + 1,
|
fullLength = snprintf(dest, maxLength + 1,
|
||||||
mode ? : "$%X",
|
mode ? mode : "$%X",
|
||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ static uint32_t str2int2(char *s, int32_t length)
|
|||||||
int32_t i;
|
int32_t i;
|
||||||
uint32_t r = 0;
|
uint32_t r = 0;
|
||||||
|
|
||||||
i = ((length - 4) < 0) ? 0 : length - 4;
|
i = length < 4 ? 0 : length - 4;
|
||||||
while (i < length) {
|
while (i < length) {
|
||||||
r <<= 8;
|
r <<= 8;
|
||||||
r |= (uint8_t)s[i];
|
r |= (uint8_t)s[i];
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ char *sym_FindMacroArg(int32_t i)
|
|||||||
if (i == -1)
|
if (i == -1)
|
||||||
i = MAXMACROARGS + 1;
|
i = MAXMACROARGS + 1;
|
||||||
|
|
||||||
assert(i - 1 >= 0);
|
assert(i >= 1);
|
||||||
|
|
||||||
assert((size_t)(i - 1)
|
assert((size_t)(i - 1)
|
||||||
< sizeof(currentmacroargs) / sizeof(*currentmacroargs));
|
< sizeof(currentmacroargs) / sizeof(*currentmacroargs));
|
||||||
|
|||||||
Reference in New Issue
Block a user