xdiff: avoid signed vs. unsigned comparisons in xdiffi.c
The loop iteration variable is non-negative and only used in comparisons against other size_t values. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Aguilar committed
Feb 11, 2025 at 22:04 UTC
0d31bab479820c1536893f6fbc0dbb1ef1637eb0
1 file changed
+1
-2
xdiff/xdiffi.c
+1
-2
@@ -19,7 +19,6 @@
19
* Davide Libenzi <davidel@xmailserver.org>
20
*
21
*/
22
-#define DISABLE_SIGN_COMPARE_WARNINGS
22
23
#include "xinclude.h"
24
@@ -1014,7 +1013,7 @@ static void xdl_mark_ignorable_lines(xdchange_t *xscr, xdfenv_t *xe, long flags)
1013
1014
static int record_matches_regex(xrecord_t *rec, xpparam_t const *xpp) {
1015
regmatch_t regmatch;
1017
- int i;
1016
+ size_t i;
1017
1018
for (i = 0; i < xpp->ignore_regex_nr; i++)
1019
if (!regexec_buf(xpp->ignore_regex[i], rec->ptr, rec->size, 1,