parse-options: cast long name for OPTION_ALIAS

We assign the long name for OPTION_ALIAS options to a non-constant value field. We know that the variable will never be written to, but this will cause warnings once we enable `-Wwrite-strings`. Cast away the constness to be prepared for this change. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Jun 7, 2024 at 08:38 UTC e463c5e8a0c306b62c25ff5856087ab32403158a
1 file changed +1 -1
parse-options.h
+1 -1
@@ -355,7 +355,7 @@ struct option {
355 .type = OPTION_ALIAS, \
356 .short_name = (s), \
357 .long_name = (l), \
358 - .value = (source_long_name), \
358 + .value = (char *)(source_long_name), \
359 }
360
361 #define OPT_SUBCOMMAND_F(l, v, fn, f) { \