From de549f0eb9b90ed2183a46b4e29dc91e75fa8091 Mon Sep 17 00:00:00 2001 From: harry Date: Sat, 24 Feb 2024 13:28:36 -0500 Subject: [PATCH] Build fix for const qualifier not being respected. --- src/boards/coolgirl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/boards/coolgirl.cpp b/src/boards/coolgirl.cpp index 3e24994f..e6187efe 100644 --- a/src/boards/coolgirl.cpp +++ b/src/boards/coolgirl.cpp @@ -227,7 +227,7 @@ static uint8 flash_buffer_v[10]; static uint8 cfi_mode = 0; // Micron 4-gbit memory CFI data -const uint8 cfi_data[] = +static const uint8 cfi_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x52, 0x59, 0x02, 0x00, 0x40, 0x00, 0x00, @@ -247,7 +247,7 @@ const uint8 cfi_data[] = #define SET_BITS(target, target_bits, source, source_bits) target = set_bits(target, target_bits, get_bits(source, source_bits)) -static inline uint8 string_to_bits(char* bitsstr, int* bits) +static inline uint8 string_to_bits(const char* bitsstr, int* bits) { uint8 bit1, bit2, count = 0; for (int i = 0; i < 32; i++) @@ -298,7 +298,7 @@ static inline uint8 string_to_bits(char* bitsstr, int* bits) return count; } -static inline uint32 get_bits(uint32 V, char* bitsstr) +static inline uint32 get_bits(const uint32 V, const char* bitsstr) { uint32 result = 0; int bits[32]; @@ -311,7 +311,7 @@ static inline uint32 get_bits(uint32 V, char* bitsstr) return result; } -static inline uint32 set_bits(uint32 V, char* bitsstr, uint32 new_bits) +static inline uint32 set_bits(uint32 V, const char* bitsstr, const uint32 new_bits) { int bits[32]; uint8 count = string_to_bits(bitsstr, bits);