Check RGBGFX warning/error format strings with format_ macro

This commit is contained in:
Rangi42
2024-03-02 23:08:20 -05:00
parent 2e1b0b6421
commit d812acff24
7 changed files with 81 additions and 69 deletions

View File

@@ -260,7 +260,7 @@ static void generate_random_image(char const *filename) {
write_image(filename, palettes, tileData, attributes, width, height);
}
int main(int argc, char **argv) {
int main(int argc, char *argv[]) {
if (argc < 3 || argc > 4) {
fprintf(stderr, "usage: %s <input file> <basename> [<maxcount>]\n", argv[0]);
return 2;

View File

@@ -112,9 +112,9 @@ class Png {
if (nbBytesRead != expectedLen) {
fatal("Error reading input image (\"%s\"): file too short (expected at least %zd more "
"bytes after reading %lld)",
"bytes after reading %zu)",
self->path.c_str(), length - nbBytesRead,
self->file.pubseekoff(0, std::ios_base::cur));
(size_t)self->file.pubseekoff(0, std::ios_base::cur));
}
}
@@ -369,7 +369,7 @@ static char *execProg(char const *name, char * const *argv) {
return nullptr;
}
int main(int argc, char **argv) {
int main(int argc, char *argv[]) {
if (argc < 2) {
fprintf(stderr, "usage: %s <rng file> [rgbgfx flags]\n", argv[0]);
exit(0);