]> git.99rst.org Git - git.git/commit
http: do not assign string constant to non-const field
authorPatrick Steinhardt <redacted>
Fri, 7 Jun 2024 06:38:49 +0000 (08:38 +0200)
committerJunio C Hamano <redacted>
Fri, 7 Jun 2024 17:30:53 +0000 (10:30 -0700)
commit8d3a7ce441422f4b48f14c19a1b3be4ba7bfd30f
tree5a3360fa0b33605b7cba9a2e78b5e802fc06ccbf
parente7b40195ae0082d04ea8c0d1769d90ea700b76f2
http: do not assign string constant to non-const field

In `write_accept_language()`, we put all acceptable languages into an
array. While all entries in that array are allocated strings, the final
entry in that array is a string constant. This is fine because we
explicitly skip over the last entry when freeing the array, but will
cause warnings once we enable `-Wwrite-strings`.

Adapt the code to also allocate the final entry.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
http.c
git clone https://git.99rst.org/PROJECT