Skip to content

Commit 913a1e1

Browse files
committed
Merge branch 'ps/build-sign-compare' into ps/the-repository
* 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
2 parents d882f38 + e03d2a9 commit 913a1e1

File tree

266 files changed

+523
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+523
-236
lines changed

add-interactive.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define USE_THE_REPOSITORY_VARIABLE
2+
#define DISABLE_SIGN_COMPARE_WARNINGS
23

34
#include "git-compat-util.h"
45
#include "add-interactive.h"

add-patch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define USE_THE_REPOSITORY_VARIABLE
2+
#define DISABLE_SIGN_COMPARE_WARNINGS
23

34
#include "git-compat-util.h"
45
#include "add-interactive.h"

advice.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ void advise_if_enabled(enum advice_type type, const char *advice, ...)
160160
int git_default_advice_config(const char *var, const char *value)
161161
{
162162
const char *k, *slot_name;
163-
int i;
164163

165164
if (!strcmp(var, "color.advice")) {
166165
advice_use_color = git_config_colorbool(var, value);
@@ -179,7 +178,7 @@ int git_default_advice_config(const char *var, const char *value)
179178
if (!skip_prefix(var, "advice.", &k))
180179
return 0;
181180

182-
for (i = 0; i < ARRAY_SIZE(advice_setting); i++) {
181+
for (size_t i = 0; i < ARRAY_SIZE(advice_setting); i++) {
183182
if (strcasecmp(k, advice_setting[i].key))
184183
continue;
185184
advice_setting[i].level = git_config_bool(var, value)
@@ -193,9 +192,7 @@ int git_default_advice_config(const char *var, const char *value)
193192

194193
void list_config_advices(struct string_list *list, const char *prefix)
195194
{
196-
int i;
197-
198-
for (i = 0; i < ARRAY_SIZE(advice_setting); i++)
195+
for (size_t i = 0; i < ARRAY_SIZE(advice_setting); i++)
199196
list_config_item(list, prefix, advice_setting[i].key);
200197
}
201198

apply.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99

1010
#define USE_THE_REPOSITORY_VARIABLE
11+
#define DISABLE_SIGN_COMPARE_WARNINGS
1112

1213
#include "git-compat-util.h"
1314
#include "abspath.h"

archive.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define USE_THE_REPOSITORY_VARIABLE
2+
#define DISABLE_SIGN_COMPARE_WARNINGS
23

34
#include "git-compat-util.h"
45
#include "abspath.h"

attr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
#define USE_THE_REPOSITORY_VARIABLE
10+
#define DISABLE_SIGN_COMPARE_WARNINGS
1011

1112
#include "git-compat-util.h"
1213
#include "config.h"

base85.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ static const char en85[] = {
2929
static char de85[256];
3030
static void prep_base85(void)
3131
{
32-
int i;
3332
if (de85['Z'])
3433
return;
35-
for (i = 0; i < ARRAY_SIZE(en85); i++) {
34+
for (size_t i = 0; i < ARRAY_SIZE(en85); i++) {
3635
int ch = en85[i];
3736
de85[ch] = i + 1;
3837
}

bisect.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define USE_THE_REPOSITORY_VARIABLE
2+
#define DISABLE_SIGN_COMPARE_WARNINGS
23

34
#include "git-compat-util.h"
45
#include "config.h"

blame.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define USE_THE_REPOSITORY_VARIABLE
2+
#define DISABLE_SIGN_COMPARE_WARNINGS
23

34
#include "git-compat-util.h"
45
#include "refs.h"

bloom.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#define DISABLE_SIGN_COMPARE_WARNINGS
2+
13
#include "git-compat-util.h"
24
#include "bloom.h"
35
#include "diff.h"

0 commit comments

Comments
 (0)