From 1e8e4825fa828a593a83275ab0767568748a0496 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 14 Mar 2025 10:06:39 +0300 Subject: [PATCH] engine: fix remaining -Wformat=2 and force it to -Werror --- engine/common/imagelib/img_wad.c | 2 +- wscript | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/common/imagelib/img_wad.c b/engine/common/imagelib/img_wad.c index 14513752..3f3ee206 100644 --- a/engine/common/imagelib/img_wad.c +++ b/engine/common/imagelib/img_wad.c @@ -32,7 +32,7 @@ qboolean Image_LoadPAL( const char *name, const byte *buffer, fs_offset_t filesi if( filesize > sizeof( pal )) { - Con_DPrintf( S_ERROR "%s: (%s) have invalid size (%li should be less or equal than %d)\n", __func__, name, (long)filesize, sizeof( pal )); + Con_DPrintf( S_ERROR "%s: (%s) have invalid size (%li should be less or equal than %zu)\n", __func__, name, (long)filesize, sizeof( pal )); return false; } else if( filesize < sizeof( pal ) && buffer != NULL ) diff --git a/wscript b/wscript index 61a75788..d172eddd 100644 --- a/wscript +++ b/wscript @@ -333,7 +333,7 @@ def configure(conf): '-Werror=bool-operation', # '-Werror=cast-align=strict', '-Werror=duplicated-cond', - '-Werror=format-extra-args', + '-Werror=format=2', '-Werror=free-nonheap-object', '-Werror=implicit-fallthrough=2', '-Werror=logical-op', @@ -356,7 +356,6 @@ def configure(conf): # unstable diagnostics, may cause false positives '-Walloc-zero', - '-Wformat=2', '-Winit-self', '-Wmisleading-indentation', '-Wmismatched-dealloc',