misc: Clean up a large pile of -Wexpansion-to-defined warnings

And re-enable the warning (applies with GCC 7+)

Change-Id: I406ce796ebd06bad53cab911e17a28265a79b420
This commit is contained in:
Solomon Peachy 2025-04-21 20:52:56 -04:00
parent 6fc87143df
commit c7eda36341
7 changed files with 21 additions and 18 deletions

View file

@ -412,7 +412,7 @@ static const struct plugin_api rockbox_api = {
storage_sleep,
STORAGE_FUNCTION(spin),
STORAGE_FUNCTION(spindown),
#if USING_STORAGE_CALLBACK
#ifdef USING_STORAGE_CALLBACK
register_storage_idle_func,
unregister_storage_idle_func,
#endif /* USING_STORAGE_CALLBACK */

View file

@ -474,7 +474,7 @@ struct plugin_api {
void (*storage_sleep)(void);
void (*storage_spin)(void);
void (*storage_spindown)(int seconds);
#if USING_STORAGE_CALLBACK
#ifdef USING_STORAGE_CALLBACK
void (*register_storage_idle_func)(void (*function)(void));
void (*unregister_storage_idle_func)(void (*function)(void), bool run);
#endif /* USING_STORAGE_CALLBACK */

View file

@ -458,7 +458,7 @@ static void thread(void)
bat[buf_idx].flags = charge_state();
#endif
buf_idx++;
#if USING_STORAGE_CALLBACK
#ifdef USING_STORAGE_CALLBACK
rb->register_storage_idle_func(flush_buffer);
#endif
}
@ -497,7 +497,7 @@ static void thread(void)
}
}
#if USING_STORAGE_CALLBACK
#ifdef USING_STORAGE_CALLBACK
/* unregister flush callback and flush to disk */
rb->unregister_storage_idle_func(flush_buffer, true);
#else