xdiff: move sign comparison warning guard into each file

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>
This commit is contained in:
David Aguilar
2025-02-11 22:04:13 -08:00
committed by Junio C Hamano
parent 388218fac7
commit 9d16f89584
5 changed files with 9 additions and 2 deletions

View 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) {

View 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

View 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"

View File

@@ -19,6 +19,9 @@
* Davide Libenzi <davidel@xmailserver.org>
*
*/
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "xinclude.h"
/*

View File

@@ -20,6 +20,8 @@
*
*/
#define DISABLE_SIGN_COMPARE_WARNINGS
#include "xinclude.h"