Skip to content

Commit 0d31bab

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

xdiff/xdiffi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
* Davide Libenzi <[email protected]>
2020
*
2121
*/
22-
#define DISABLE_SIGN_COMPARE_WARNINGS
2322

2423
#include "xinclude.h"
2524

@@ -1014,7 +1013,7 @@ static void xdl_mark_ignorable_lines(xdchange_t *xscr, xdfenv_t *xe, long flags)
10141013

10151014
static int record_matches_regex(xrecord_t *rec, xpparam_t const *xpp) {
10161015
regmatch_t regmatch;
1017-
int i;
1016+
size_t i;
10181017

10191018
for (i = 0; i < xpp->ignore_regex_nr; i++)
10201019
if (!regexec_buf(xpp->ignore_regex[i], rec->ptr, rec->size, 1,

0 commit comments

Comments
 (0)