Merge branch 'ps/build-sign-compare'
Start working to make the codebase buildable with -Wsign-compare. * ps/build-sign-compare: t/helper: don't depend on implicit wraparound scalar: address -Wsign-compare warnings builtin/patch-id: fix type of `get_one_patchid()` builtin/blame: fix type of `length` variable when emitting object ID gpg-interface: address -Wsign-comparison warnings daemon: fix type of `max_connections` daemon: fix loops that have mismatching integer types global: trivial conversions to fix `-Wsign-compare` warnings pkt-line: fix -Wsign-compare warning on 32 bit platform csum-file: fix -Wsign-compare warning on 32-bit platform diff.h: fix index used to loop through unsigned integer config.mak.dev: drop `-Wno-sign-compare` global: mark code units that generate warnings with `-Wsign-compare` compat/win32: fix -Wsign-compare warning in "wWinMain()" compat/regex: explicitly ignore "-Wsign-compare" warnings git-compat-util: introduce macros to disable "-Wsign-compare" warnings
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
* This file is licensed under the GPL v2.
|
||||
*
|
||||
*/
|
||||
|
||||
#define USE_THE_REPOSITORY_VARIABLE
|
||||
|
||||
#include "builtin.h"
|
||||
@ -389,7 +390,6 @@ static int cmp_remaining_objects(const void *a, const void *b)
|
||||
static void sort_pack_list(struct pack_list **pl)
|
||||
{
|
||||
struct pack_list **ary, *p;
|
||||
int i;
|
||||
size_t n = pack_list_size(*pl);
|
||||
|
||||
if (n < 2)
|
||||
@ -403,7 +403,7 @@ static void sort_pack_list(struct pack_list **pl)
|
||||
QSORT(ary, n, cmp_remaining_objects);
|
||||
|
||||
/* link them back again */
|
||||
for (i = 0; i < n - 1; i++)
|
||||
for (size_t i = 0; i < n - 1; i++)
|
||||
ary[i]->next = ary[i + 1];
|
||||
ary[n - 1]->next = NULL;
|
||||
*pl = ary[0];
|
||||
|
Reference in New Issue
Block a user