From 47d72a74a737f06791c282a75baf2c573cdf42f6 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 6 Dec 2024 11:27:21 +0100 Subject: diff.h: fix index used to loop through unsigned integer The `struct diff_flags` structure is essentially an array of flags, all of which have the same type. We can thus use `sizeof()` to iterate through all of the flags, which we do in `diff_flags_or()`. But while the statement returns an unsigned integer, we used a signed integer to iterate through the flags, which generates a warning. Fix this by using `size_t` for the index instead. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diffcore-order.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'diffcore-order.c') diff --git a/diffcore-order.c b/diffcore-order.c index ec59d3d9bc..f91ef22471 100644 --- a/diffcore-order.c +++ b/diffcore-order.c @@ -2,8 +2,6 @@ * Copyright (C) 2005 Junio C Hamano */ -#define DISABLE_SIGN_COMPARE_WARNINGS - #include "git-compat-util.h" #include "gettext.h" #include "diff.h" -- cgit v1.2.3