I've recently upgraded my IDE to use Crossworks v3.6.2 which uses a GCC ARM Embedded 4.9-2015-q3-update compiler. it has by default many of the code clean up featues turned on. it has found a great many warning messages, and I was wondering if there was a quick way to clean them up.
1> c:....\s110\headers\nrf_soc.h: In function 'sd_mutex_new': 1> c:....\s110\headers\nrf_soc.h:374:59: warning: unused parameter 'p_mutex' [-Wunused-parameter] 1> c:....\s110\headers\nrf_svc.h:52:45: note: in definition of macro 'SVCALL' 1> c:....\s110\headers\nrf_soc.h: In function 'sd_mutex_acquire': 1> c:....\s110\headers\nrf_soc.h:383:67: warning: unused parameter 'p_mutex' [-Wunused-parameter] 1> c:....\s110\headers\nrf_svc.h:52:45: note: in definition of macro 'SVCALL' 1> c:....\s110\headers\nrf_soc.h: In function 'sd_mutex_release':
The code line in question is
SVCALL(SD_BLE_ENABLE, uint32_t, sd_ble_enable(ble_enable_params_t * p_ble_enable_params));
and SVCALL is linked to this
#define SVCALL(number, return_type, signature) \
_Pragma("GCC diagnostic ignored \"-Wunused-function\"") \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \
__attribute__((naked)) static return_type signature \
{ \
__asm( \
"svc %0\n" \
"bx r14" : : "I" (number) : "r0" \
); \
} \
_Pragma("GCC diagnostic pop")
All the SVCALL's produce the same warning messages. like 1300 warnings from the Nordic SDK.
I've tried adding the preprocessor define SVCALL_AS_NORMAL_FUNCTION, but now my various calls that were inside a SVCALL, "don't exist" any longer. which I assume is because they are in the softdevice.
Some direction would be great. Thanks