]> git.ipfire.org Git - thirdparty/git.git/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 75f0fe498661c43078fe19f8b5d10926700763de..2b394a4806cc454c75daadee8de6095895e2c752 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 16a8fe2f3f3df3fe52fee0ed6d527682a61a0dc8..3d2b190fa6f1fb17b6187663d548c037c216be32 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 7e56542526a9fe9669a435929b877382b2b4e835..a4285ac0eb2840fb3d128b81ab4e19ca3fa673ae 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 a2d8955537f566458b6e912ff5fb8496fa7fe85a..b0ba421b28537c278165d07031dffe3ecb3cd0b6 100644 (file)
@@ -19,6 +19,9 @@
  *  Davide Libenzi <davidel@xmailserver.org>
  *
  */
+
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
 #include "xinclude.h"
 
 /*
index 9e36f24875d20711b61d243994f324d00a1b211e..169edff5ab982bf9ff2b1c970152759b8eb5e54c 100644 (file)
@@ -20,6 +20,8 @@
  *
  */
 
+#define DISABLE_SIGN_COMPARE_WARNINGS
+
 #include "xinclude.h"