console: argtable3: fix -Wwrite-strings warnings

Re-apply commit 744c2dcdd9
This commit is contained in:
Ivan Grokhotkov 2022-04-05 19:59:08 +02:00
parent 8240144580
commit ebe1acc6b8
No known key found for this signature in database
GPG Key ID: 1E050E141B280628

View File

@ -668,9 +668,9 @@ void arg_print_option(FILE* fp, const char* shortopts, const char* longopts, con
*/
static void arg_print_gnuswitch_ds(arg_dstr_t ds, struct arg_hdr** table) {
int tabindex;
char* format1 = " -%c";
char* format2 = " [-%c";
char* suffix = "";
const char* format1 = " -%c";
const char* format2 = " [-%c";
const char* suffix = "";
/* print all mandatory switches that are without argument values */
for (tabindex = 0; table[tabindex] && !(table[tabindex]->flag & ARG_TERMINATOR); tabindex++) {