mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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:
@@ -25,11 +25,10 @@ const char *git_user_agent_sanitized(void)
|
||||
|
||||
if (!agent) {
|
||||
struct strbuf buf = STRBUF_INIT;
|
||||
int i;
|
||||
|
||||
strbuf_addstr(&buf, git_user_agent());
|
||||
strbuf_trim(&buf);
|
||||
for (i = 0; i < buf.len; i++) {
|
||||
for (size_t i = 0; i < buf.len; i++) {
|
||||
if (buf.buf[i] <= 32 || buf.buf[i] >= 127)
|
||||
buf.buf[i] = '.';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user