Skip to content

ISOC23: quell warnings on discarding const

Michael J Gruber git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6do not discard const: the simple casesbuiltin/config.c builtin/receive-pack.c http.c +6 more+13 -133 replies
2/6do not discard const: make git-compat-util ISOC23-likegit-compat-util.h scalar.c submodule.c+3 -30 replies
3/6do not discard const: adjust to non-const data typeshttp-push.c run-command.c+2 -21 reply
4/6do not discard const: declare const where we stay constconvert.c+2 -10 replies
5/6do not discard const: keep signaturepseudo-merge.c+1 -11 reply
6/6do not discard const: the ugly truthbuiltin/rev-parse.c revision.c+8 -810 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] ISOC23: quell warnings on discarding const

Hi there

Fedora 44 beta (gcc-16.0.1, glibc-2.43) brought some fun new warnings when building git. In essence, we're not always explicit about const-ness or lack thereof of certain pointers. Before, strchr()'s signature which turns const arguments into non-const return values covered this up. With ISOC23, strchr() and friends return const pointers.

This little series takes a middle-ground: no new data types (no new const versions of non-const data types) but more explicit casts.

Michael J Gruber (6):
do not discard const: the simple cases
do not discard const: make git-compat-util ISOC23-like do not discard const: adjust to non-const data types do not discard const: declare const where we stay const do not discard const: keep signature
do not discard const: the ugly truth

 builtin/config.c       | 2 +-
 builtin/receive-pack.c | 6 +++---
 builtin/rev-parse.c    | 8 ++++----
 convert.c              | 3 ++-
 git-compat-util.h      | 2 +-
 http-push.c            | 2 +-
 http.c                 | 2 +-
 pager.c                | 2 +-
 pseudo-merge.c         | 2 +-
 range-diff.c           | 2 +-
 refs/files-backend.c   | 2 +-
 remote.c               | 2 +-
 revision.c             | 8 ++++----
 run-command.c          | 2 +-
 scalar.c               | 2 +-
 send-pack.c            | 6 +++---
 submodule.c            | 2 +-
 transport-helper.c     | 2 +-
 18 files changed, 29 insertions(+), 28 deletions(-)
Signature · 1 line
2.53.0.1195.g771ffcb452