mirror of
https://github.com/git/git.git
synced 2024-09-08 03:50:44 +02:00
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>
This commit is contained in:
parent
8d3a7ce441
commit
e463c5e8a0
@ -355,7 +355,7 @@ struct option {
|
||||
.type = OPTION_ALIAS, \
|
||||
.short_name = (s), \
|
||||
.long_name = (l), \
|
||||
.value = (source_long_name), \
|
||||
.value = (char *)(source_long_name), \
|
||||
}
|
||||
|
||||
#define OPT_SUBCOMMAND_F(l, v, fn, f) { \
|
||||
|
Loading…
Reference in New Issue
Block a user