From: Andre Noll Date: Tue, 27 May 2025 19:19:30 +0000 (+0200) Subject: filter.c: Constify dummy variable. X-Git-Url: https://git.tuebingen.mpg.de/?a=commitdiff_plain;h=842de7d07a58a12c95fd4b6ce9bb29b3e8f8f588;p=paraslash.git filter.c: Constify dummy variable. It needs to be non-static, but it may be const because the amp filter only reads the values of this array. --- diff --git a/amp_filter.c b/amp_filter.c index a5b22218..8ca66dec 100644 --- a/amp_filter.c +++ b/amp_filter.c @@ -13,7 +13,7 @@ #include "string.h" #include "error.h" -extern char *stat_item_values[NUM_STAT_ITEMS]; +extern const char *stat_item_values[NUM_STAT_ITEMS]; /** Data specific to the amplify filter. */ struct private_amp_data { diff --git a/filter.c b/filter.c index 993e54af..a08bea51 100644 --- a/filter.c +++ b/filter.c @@ -34,7 +34,7 @@ static struct lls_parse_result *lpr; /* command line options */ * This is used by the amp filter which first tries to obtain the amplification * value from an element in this array. */ -char *stat_item_values[NUM_STAT_ITEMS] = {NULL}; +const char *stat_item_values[NUM_STAT_ITEMS] = {NULL}; /** The task that reads from stdin. */ static struct stdin_task stdin_task_struct;