diff --git a/arch/arm/src/cxd56xx/cxd56_farapi.c b/arch/arm/src/cxd56xx/cxd56_farapi.c index aaddaa83c1..6cf008e4b5 100644 --- a/arch/arm/src/cxd56xx/cxd56_farapi.c +++ b/arch/arm/src/cxd56xx/cxd56_farapi.c @@ -182,7 +182,7 @@ static int cxd56_farapidonehandler(int cpuid, int protoid, * Public Functions ****************************************************************************/ -unused_code +used_code void farapi_main(int id, void *arg, struct modulelist_s *mlist) { struct farmsg_s msg; diff --git a/arch/risc-v/src/bl602/bl602_start.c b/arch/risc-v/src/bl602/bl602_start.c index 5f1a633576..4b3adc9162 100644 --- a/arch/risc-v/src/bl602/bl602_start.c +++ b/arch/risc-v/src/bl602/bl602_start.c @@ -76,7 +76,7 @@ uint8_t g_idle_stack[BL602_IDLESTACK_SIZE] * g_boot2_partition_table in linker script */ -static struct boot2_partition_table_s g_boot2_partition_table unused_data; +static struct boot2_partition_table_s g_boot2_partition_table used_data; /**************************************************************************** * Public Data diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index c83b2e7494..6efefcdd24 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -186,10 +186,12 @@ # endif #endif -/* The unsued code or data */ +/* The unused code or data */ # define unused_code __attribute__((unused)) # define unused_data __attribute__((unused)) +# define used_code __attribute__((used)) +# define used_data __attribute__((used)) /* Some versions of GCC have a separate __syslog__ format. * http://mail-index.netbsd.org/source-changes/2015/10/14/msg069435.html @@ -452,6 +454,8 @@ # define unused_code # define unused_data +# define used_code +# define used_data # define formatlike(a) # define printflike(a, b) @@ -591,6 +595,8 @@ # define nostackprotect_function # define unused_code # define unused_data +# define used_code +# define used_data # define formatlike(a) # define printflike(a, b) # define sysloglike(a, b) @@ -702,6 +708,8 @@ # define nostackprotect_function # define unused_code # define unused_data +# define used_code +# define used_data # define formatlike(a) # define printflike(a, b) # define sysloglike(a, b) @@ -768,6 +776,8 @@ # define nostackprotect_function # define unused_code # define unused_data +# define used_code +# define used_data # define formatlike(a) # define printflike(a, b) # define sysloglike(a, b)