aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/diff-index.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 11:27:16 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-06 20:20:01 +0900
commit2121a76d71e6742fe9627289b45717663bcef832 (patch)
treed2b9b9578adb1057f48d830e15dd5d6ec74cfa9f /builtin/diff-index.c
parentThe fourteenth batch (diff)
downloadgit-2121a76d71e6742fe9627289b45717663bcef832.tar.gz
git-2121a76d71e6742fe9627289b45717663bcef832.zip
git-compat-util: introduce macros to disable "-Wsign-compare" warnings
When compiling with DEVELOPER=YesPlease, we explicitly disable the "-Wsign-compare" warning. This is mostly because our code base is full of cases where we don't bother at all whether something should be signed or unsigned, and enabling the warning would thus cause tons of warnings to pop up. Unfortunately, disabling this warning also masks real issues. There have been multiple CVEs in the Git project that would have been flagged by this warning (e.g. CVE-2022-39260, CVE-2022-41903 and several fixes in the vicinity of these CVEs). Furthermore, the final audit report by X41 D-Sec, who are the ones who have discovered some of the CVEs, hinted that it might be a good idea to become more strict in this context. Now simply enabling the warning globally does not fly due to the stated reason above that we simply have too many sites where we use the wrong integer types. Instead, introduce a new set of macros that allow us to mark a file as being free of warnings with "-Wsign-compare". The mechanism is similar to what we do with `USE_THE_REPOSITORY_VARIABLE`: every file that is not marked with `DISABLE_SIGN_COMPARE_WARNINGS` will be compiled with those warnings enabled. These new markings will be wired up in the subsequent commits. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/diff-index.c')
0 files changed, 0 insertions, 0 deletions
nk1-0/+2 2008-03-02Fix doc typos.Ralf Wildenhues2-4/+4 2008-03-02fast-import: exit with proper message if not a git dirJean-Luc Herren1-0/+1 2008-03-02format-patch: wrap cover-letter's shortlog sensiblyJohannes Schindelin3-2/+25 2008-03-02format-patch: use the diff options for the cover letter, tooJohannes Schindelin2-6/+16 2008-03-02gitweb: Mark first match when searching commit messagesJakub Narebski1-1/+1 2008-03-02Documentation: Remove --{min,max}-age option from git-log(1)Jakub Narebski1-0/+2 2008-03-02cleanup: remove unused git_checkout_configDenis Cheng1-6/+1 2008-03-02Fix make_absolute_path() for parameters without a slashJohannes Schindelin2-1/+5 2008-03-02diff: make sure work tree side is shown as 0{40} when differentJunio C Hamano2-5/+55 2008-03-02diff-lib.c: constness strengtheningJunio C Hamano1-7/+6 2008-03-01Clean up find_unique_abbrev() callersJunio C Hamano3-11/+3 2008-03-01find_unique_abbrev(): redefine semanticsJunio C Hamano1-7/+6 2008-03-01git rebase --abort: always restore the right commitMike Hommey2-4/+3 2008-03-01Documentation/git-rebase.txt: Add --strategy to synopsysMike Hommey1-0/+1 2008-03-01CodingGuidelines: spell out how we use grep in our scriptsJunio C Hamano1-0/+12 2008-03-01add storage size output to 'git verify-pack -v'Nicolas Pitre3-7/+7 2008-03-01fix unimplemented packed_object_info_detail() featuresNicolas Pitre2-3/+10 2008-03-01make verify_one_pack() a bit less wrong wrt packed_git structureNicolas Pitre1-1/+1 2008-03-01factorize revindex code out of builtin-pack-objects.cNicolas Pitre4-152/+167 2008-03-01allow git-am to run in a subdirectoryJeff King1-0/+2 2008-03-01rename: warn user when we have turned off rename detectionJeff King1-3/+4