Alexandre Julliard : makefiles: Force -Wformat for PE modules when using 'long' types.

Alexandre Julliard julliard at winehq.org
Thu Jan 27 15:36:18 CST 2022


Module: wine
Branch: master
Commit: 0c0e8b576e6226cd722f328ad97f51c642f3ad53
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0c0e8b576e6226cd722f328ad97f51c642f3ad53

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jan 27 14:20:22 2022 +0100

makefiles: Force -Wformat for PE modules when using 'long' types.

Suggested by Eric Pouech.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/makedep.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/makedep.c b/tools/makedep.c
index 589ea7a7514..5dc0a97fdb3 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -3057,6 +3057,11 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
         output_filenames( make->extlib ? extra_cross_cflags_extlib : extra_cross_cflags );
         if (make->module && is_crt_module( make->module ))
             output_filename( "-fno-builtin" );
+        /* force -Wformat when using 'long' types, until all modules have been converted
+         * and we can remove -Wno-format */
+        if (!make->extlib && strarray_exists( &extra_cross_cflags, "-Wno-format" ) &&
+            !strarray_exists( &defines, "-DWINE_NO_LONG_TYPES" ))
+            output_filename( "-Wformat" );
         output_filenames( cpp_flags );
         output_filename( "$(CROSSCFLAGS)" );
         output( "\n" );




More information about the wine-cvs mailing list