From cb478d9d3fd477758f8dd570cf11547ba64c8dd1 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Tue, 26 Nov 2024 22:07:24 -0500 Subject: [PATCH] add INIT_ATTR to dircache_load and core_load_key_remap both of these are only called in main at init Change-Id: If2020c2832df837aca23a331474bbf2352d803d4 --- apps/core_keymap.c | 2 +- firmware/common/dircache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/core_keymap.c b/apps/core_keymap.c index 89e7913c33..3ad83c9f96 100644 --- a/apps/core_keymap.c +++ b/apps/core_keymap.c @@ -69,7 +69,7 @@ static int open_key_remap(const char *filename, int *countp) return -1; } -int core_load_key_remap(const char *filename) +int INIT_ATTR core_load_key_remap(const char *filename) { int count = 0; /* gcc falsely believes this may be used uninitialized */ int fd = open_key_remap(filename, &count); diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index c274b6c62c..116148ee6a 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -3024,7 +3024,7 @@ static bool dircache_is_clean(bool saving) * function to load the internal cache structure from disk to initialize * the dircache really fast with little disk access. */ -int dircache_load(void) +int INIT_ATTR dircache_load(void) { logf("Loading directory cache"); int fd = open_dircache_file(O_RDONLY);