Git fork

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>

authored by

David Aguilar and committed by
Junio C Hamano
9d16f895 388218fa

+9 -2
+2
xdiff/xemit.c
··· 20 * 21 */ 22 23 #include "xinclude.h" 24 25 static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) {
··· 20 * 21 */ 22 23 + #define DISABLE_SIGN_COMPARE_WARNINGS 24 + 25 #include "xinclude.h" 26 27 static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) {
+2
xdiff/xhistogram.c
··· 41 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 42 */ 43 44 #include "xinclude.h" 45 46 #define MAX_PTR UINT_MAX
··· 41 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 42 */ 43 44 + #define DISABLE_SIGN_COMPARE_WARNINGS 45 + 46 #include "xinclude.h" 47 48 #define MAX_PTR UINT_MAX
-2
xdiff/xinclude.h
··· 23 #if !defined(XINCLUDE_H) 24 #define XINCLUDE_H 25 26 - #define DISABLE_SIGN_COMPARE_WARNINGS 27 - 28 #include "git-compat-util.h" 29 #include "xmacros.h" 30 #include "xdiff.h"
··· 23 #if !defined(XINCLUDE_H) 24 #define XINCLUDE_H 25 26 #include "git-compat-util.h" 27 #include "xmacros.h" 28 #include "xdiff.h"
+3
xdiff/xpatience.c
··· 19 * Davide Libenzi <davidel@xmailserver.org> 20 * 21 */ 22 #include "xinclude.h" 23 24 /*
··· 19 * Davide Libenzi <davidel@xmailserver.org> 20 * 21 */ 22 + 23 + #define DISABLE_SIGN_COMPARE_WARNINGS 24 + 25 #include "xinclude.h" 26 27 /*
+2
xdiff/xutils.c
··· 20 * 21 */ 22 23 #include "xinclude.h" 24 25
··· 20 * 21 */ 22 23 + #define DISABLE_SIGN_COMPARE_WARNINGS 24 + 25 #include "xinclude.h" 26 27