From: Max Kellermann Date: Mon, 18 Nov 2024 11:35:21 +0000 (+0100) Subject: libsmartcols: make pointer arrays const X-Git-Tag: v2.42-start~145^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01497fa2620898409130c9ca7957f6ca59563943;p=thirdparty%2Futil-linux.git libsmartcols: make pointer arrays const --- diff --git a/libsmartcols/src/filter-param.c b/libsmartcols/src/filter-param.c index 8b8218d73..636d4e5ee 100644 --- a/libsmartcols/src/filter-param.c +++ b/libsmartcols/src/filter-param.c @@ -32,7 +32,7 @@ static int cast_param(int type, struct filter_param *n); static inline const char *datatype2str(int type) { - static const char *types[] = { + static const char *const types[] = { [SCOLS_DATA_NONE] = "none", [SCOLS_DATA_STRING] = "string", [SCOLS_DATA_U64] = "u64", diff --git a/libsmartcols/src/grouping.c b/libsmartcols/src/grouping.c index e43838e67..7e004b647 100644 --- a/libsmartcols/src/grouping.c +++ b/libsmartcols/src/grouping.c @@ -142,7 +142,7 @@ void scols_groups_fix_members_order(struct libscols_table *tb) static inline const char *group_state_to_string(int state) { - static const char *grpstates[] = { + static const char *const grpstates[] = { [SCOLS_GSTATE_NONE] = "none", [SCOLS_GSTATE_FIRST_MEMBER] = "1st-member", [SCOLS_GSTATE_MIDDLE_MEMBER] = "middle-member",