From b353d68193c6c3f08f8804db2f6986b56d0279c3 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Sun, 13 Feb 2022 00:12:42 -0800 Subject: [PATCH] [drv.uart] Make level_names and area_names const The bug from 3be4b10 should not have happened in the first place, as level_names and area_names should not have been in .data but in .rodata (or .data.rel.ro in this case), so this change makes them const. --- src/user/drv.uart/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user/drv.uart/main.cpp b/src/user/drv.uart/main.cpp index 7e11954..3ef1b23 100644 --- a/src/user/drv.uart/main.cpp +++ b/src/user/drv.uart/main.cpp @@ -31,8 +31,8 @@ struct entry }; static const uint8_t level_colors[] = {0x07, 0x07, 0x0f, 0x0b, 0x09}; -const char *level_names[] = {"", "debug", "info", "warn", "error", "fatal"}; -const char *area_names[] = { +char const * const level_names[] = {"", "debug", "info", "warn", "error", "fatal"}; +char const * const area_names[] = { #define LOG(name, lvl) #name , #include #undef LOG