pretty: add casts for decoration option pointers
commit9c076c32fbb15a0887a1ed4d2afa7e5a3fd74727
authorPatrick Steinhardt <ps@pks.im>
Fri, 7 Jun 2024 06:38:39 +0000 (7 08:38 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Jun 2024 17:30:52 +0000 (7 10:30 -0700)
tree62e968edd5811b011ab651010eb4a97b89d7ac57
parent9f03e4813a5b4e469b3a7f5ad4ada3a9c3f92bfd
pretty: add casts for decoration option pointers

The `struct decoration_options` have a prefix and suffix field which are
both non-constant, but we assign a constant pointer to them. This is
safe to do because we pass them to `format_decorations()`, which never
modifies these pointers, and then immediately discard the structure. Add
explicit casts to avoid compilation warnings with `-Wwrite-strings`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c