mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[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.
This commit is contained in:
@@ -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 <j6/tables/log_areas.inc>
|
||||
#undef LOG
|
||||
|
||||
Reference in New Issue
Block a user