Fix warnings seen on SDCC 4.6.0 due to missing const qualifiers

Building with SDCC 4.6.0 emits tons of warnings e.g.:

	cmd_parser.c:31: warning 356: object in read-only code space should be const
	cmd_parser.c:36: warning 357: pointer to object in read-only code space should be pointer to const

These of course become fatal when building with --Werror.

Comparing resultant binaries, it seems that a single string is shifted
(deduplication?) but the numbers emitted at the end of the build are
otherwise identical.
This commit is contained in:
Matt Merhar committed 2026-09-20 18:25:17 -04:00
1 parent 55431b39f6
commit 1b5243714e
22 files changed
+57 -57

No files matched your search

+3 -3
View File
@@ -35,12 +35,12 @@ __code enum sfp_quirk {
};
struct sfp_quirk_entry {
__code char *vendor; // Set vendor or model to 0 to act as wildcard
__code char *model;
__code const char *vendor; // Set vendor or model to 0 to act as wildcard
__code const char *model;
uint8_t quirks;
};
static __code struct sfp_quirk_entry sfp_quirk_table[] = {
static __code const struct sfp_quirk_entry sfp_quirk_table[] = {
{ "QSFPTEK", "QT-SFP+-T", SFP_QUIRK_DDM },
};