]> Kevux Git Server - rit/commitdiff
xdiff: move sign comparison warning guard into each file
authorDavid Aguilar <davvid@gmail.com>
Wed, 12 Feb 2025 06:04:13 +0000 (22:04 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Feb 2025 17:41:15 +0000 (09:41 -0800)
Allow each file to fix the warnings guarded by the macro separately by
moving the definition from the shared xinclude.h into each file that
needs it.

xmerge.c and xprepare.c do not contain any signed vs. unsigned
comparisons so the definition was not included in these files.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xemit.c
xdiff/xhistogram.c
xdiff/xinclude.h
xdiff/xpatience.c
xdiff/xutils.c

index 75f0fe4..2b394a4 100644 (file)
@@ -20,6 +20,8 @@
  *
  */
 
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
 #include "xinclude.h"
 
 static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) {
index 16a8fe2..3d2b190 100644 (file)
@@ -41,6 +41,8 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
 #include "xinclude.h"
 
 #define MAX_PTR        UINT_MAX
index 7e56542..a4285ac 100644 (file)
@@ -23,8 +23,6 @@
 #if !defined(XINCLUDE_H)
 #define XINCLUDE_H
 
-#define DISABLE_SIGN_COMPARE_WARNINGS
-
 #include "git-compat-util.h"
 #include "xmacros.h"
 #include "xdiff.h"
index a2d8955..b0ba421 100644 (file)
@@ -19,6 +19,9 @@
  *  Davide Libenzi <davidel@xmailserver.org>
  *
  */
+
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
 #include "xinclude.h"
 
 /*
index 9e36f24..169edff 100644 (file)
@@ -20,6 +20,8 @@
  *
  */
 
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
 #include "xinclude.h"