From 1a8a97488296d20a9e560054de4b9de7b413d453 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Fri, 19 Apr 2024 22:29:17 +0100 Subject: [PATCH] Make static tables const --- src/stk500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stk500.c b/src/stk500.c index 6f7f7156..16d0ec09 100644 --- a/src/stk500.c +++ b/src/stk500.c @@ -1253,7 +1253,7 @@ static int stk500_get_varef(const PROGRAMMER *pgm, unsigned int chan /* unused * static int stk500_set_fosc(const PROGRAMMER *pgm, double v) { unsigned prescale, cmatch, fosc; - static unsigned ps[] = { + static const unsigned ps[] = { 1, 8, 32, 64, 128, 256, 1024 }; size_t idx; @@ -1307,7 +1307,7 @@ static int stk500_set_fosc(const PROGRAMMER *pgm, double v) { static int stk500_get_fosc(const PROGRAMMER *pgm, double *v) { unsigned prescale=0, cmatch=0; - static unsigned ps[] = { + static const unsigned ps[] = { 1, 8, 32, 64, 128, 256, 1024 }; int rc;