diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-02-13 13:39:24 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-13 13:39:25 -0800 |
| commit | 7855effc952777f2fac284e4461743cf5aa20ee6 (patch) | |
| tree | 37cbf589a05604e1d2d3ca2aaaa6ce10867893f1 /t/unit-tests | |
| parent | a91de2172dac7e73de2088a7fdfeb532baa3bfca (diff) | |
| parent | fc9fd8065c6049243f50e90f00a847054ca15e28 (diff) | |
| download | git-7855effc952777f2fac284e4461743cf5aa20ee6.tar.xz | |
Merge branch 'cf/c23-const-preserving-strchr-updates-0'
ISO C23 redefines strchr and friends that tradiotionally took
a const pointer and returned a non-const pointer derived from it to
preserve constness (i.e., if you ask for a substring in a const
string, you get a const pointer to the substring). Update code
paths that used non-const pointer to receive their results that did
not have to be non-const to adjust.
* cf/c23-const-preserving-strchr-updates-0:
gpg-interface: remove an unnecessary NULL initialization
global: constify some pointers that are not written to
Diffstat (limited to 't/unit-tests')
| -rw-r--r-- | t/unit-tests/clar/clar/print.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/unit-tests/clar/clar/print.h b/t/unit-tests/clar/clar/print.h index 6a2321b399..59b7dc14a1 100644 --- a/t/unit-tests/clar/clar/print.h +++ b/t/unit-tests/clar/clar/print.h @@ -127,7 +127,7 @@ static void clar_print_tap_error(int num, const struct clar_report *report, cons static void print_escaped(const char *str) { - char *c; + const char *c; while ((c = strchr(str, '\'')) != NULL) { printf("%.*s", (int)(c - str), str); |
