1
0
Fork 0
forked from len0rd/rockbox

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

@ -25,7 +25,7 @@
#include "kernel.h"
#include "string.h"
#if USING_STORAGE_CALLBACK
#if defined(USING_STORAGE_CALLBACK)
static void wrapper(unsigned short id, void *ev_data, void *user_data)
{
(void)id;
@ -37,7 +37,7 @@ static void wrapper(unsigned short id, void *ev_data, void *user_data)
void register_storage_idle_func(void (*function)(void))
{
#if USING_STORAGE_CALLBACK
#if defined(USING_STORAGE_CALLBACK)
add_event_ex(DISK_EVENT_SPINUP, true, wrapper, function);
#else
function(); /* just call the function now */
@ -47,11 +47,11 @@ void register_storage_idle_func(void (*function)(void))
#endif
}
#if USING_STORAGE_CALLBACK
#if defined(USING_STORAGE_CALLBACK)
void unregister_storage_idle_func(void (*func)(void), bool run)
{
remove_event_ex(DISK_EVENT_SPINUP, wrapper, func);
if (run)
func();
}
@ -68,7 +68,7 @@ bool call_storage_idle_notifys(bool force)
lock_until = current_tick + 30*HZ;
send_event(DISK_EVENT_SPINUP, NULL);
return true;
}
#endif