From 45b9dea901cec7045be1a98f61d48d41dc965a9f Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 18 Jul 2025 01:12:45 +0300 Subject: make some array declarations real constants * `static const char *p = "FOO"` is not a true constant since the variable p can still be changed. It has to be declared as `static const char *const p = "FOO"`, so that the pointer itself is constant. * In case of string constants, it's easier however to use `static const char p[] = "FOO"`. --- src/view.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/view.c') diff --git a/src/view.c b/src/view.c index 972828a..0fc1986 100644 --- a/src/view.c +++ b/src/view.c @@ -149,7 +149,7 @@ TECO_DEFINE_UNDO_CALL(teco_view_ssm, teco_view_t *, unsigned int, uptr_t, sptr_t void teco_view_set_representations(teco_view_t *ctx) { - static const char *reps[] = { + static const gchar reps[][4] = { "^@", "^A", "^B", "^C", "^D", "^E", "^F", "^G", "^H", "TAB" /* ^I */, "LF" /* ^J */, "^K", "^L", "CR" /* ^M */, "^N", "^O", "^P", "^Q", "^R", "^S", "^T", "^U", "^V", "^W", -- cgit v1.2.3