Skip to content

Commit 9d16f89

Browse files
davvidgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 388218f commit 9d16f89

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

xdiff/xemit.c

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
*
2121
*/
2222

23+
#define DISABLE_SIGN_COMPARE_WARNINGS
24+
2325
#include "xinclude.h"
2426

2527
static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) {

xdiff/xhistogram.c

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4242
*/
4343

44+
#define DISABLE_SIGN_COMPARE_WARNINGS
45+
4446
#include "xinclude.h"
4547

4648
#define MAX_PTR UINT_MAX

xdiff/xinclude.h

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#if !defined(XINCLUDE_H)
2424
#define XINCLUDE_H
2525

26-
#define DISABLE_SIGN_COMPARE_WARNINGS
27-
2826
#include "git-compat-util.h"
2927
#include "xmacros.h"
3028
#include "xdiff.h"

xdiff/xpatience.c

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
* Davide Libenzi <[email protected]>
2020
*
2121
*/
22+
23+
#define DISABLE_SIGN_COMPARE_WARNINGS
24+
2225
#include "xinclude.h"
2326

2427
/*

xdiff/xutils.c

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
*
2121
*/
2222

23+
#define DISABLE_SIGN_COMPARE_WARNINGS
24+
2325
#include "xinclude.h"
2426

2527

0 commit comments

Comments
 (0)