From 3a6170f37a91d4eb83676cadf62c113089156e3a Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Mon, 18 Sep 2023 20:16:56 +0200 Subject: [PATCH 1/7] os: Fixed an unused parameter warning in tpl_null_it(). The 'foo' parameter is not used and triggers a compilation warning. Signed-off-by: Adrien Ricciardi --- os/tpl_os_interrupt_kernel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/os/tpl_os_interrupt_kernel.c b/os/tpl_os_interrupt_kernel.c index 589bf5e7a..109146474 100644 --- a/os/tpl_os_interrupt_kernel.c +++ b/os/tpl_os_interrupt_kernel.c @@ -266,6 +266,7 @@ FUNC(tpl_status, OS_CODE) tpl_terminate_isr2_service(void) FUNC(void, OS_CODE) tpl_null_it(P2CONST(void, OS_APPL_DATA, AUTOMATIC) foo) { /* empty function */ + (void) foo; } #define OS_STOP_SEC_CODE From 29fadb63451c3900847dfb96071f0abf76ec02b4 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Mon, 18 Sep 2023 20:18:28 +0200 Subject: [PATCH 2/7] os: Fixed an unused parameter warning in CALL_SHUTDOWN_HOOK(). The 'error' parameter is not used when the shutdown hook support is not enabled and triggers a warning in and triggers a compilation warning in os/tpl_os_os_kernel.c, function tpl_call_shutdown_os(). Signed-off-by: Adrien Ricciardi --- os/tpl_os_hooks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/tpl_os_hooks.h b/os/tpl_os_hooks.h index cbe3c1223..f4e4b5eeb 100644 --- a/os/tpl_os_hooks.h +++ b/os/tpl_os_hooks.h @@ -112,7 +112,7 @@ ShutdownHook(error); \ RESET_RUNNING_TRUSTED #else -# define CALL_SHUTDOWN_HOOK(error) +# define CALL_SHUTDOWN_HOOK(error) { (void) error; } #endif /** From 6faab774416f453ca2261d63017c85da3e2f32f0 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Mon, 18 Sep 2023 20:21:05 +0200 Subject: [PATCH 3/7] machines: cortex-a: Fixed an unused parameter warning in tpl_check_stack_footprint(). The 'proc_id' parameter is not used and triggers a compilation warning. Signed-off-by: Adrien Ricciardi --- machines/cortex-a/tpl_machine_arm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/machines/cortex-a/tpl_machine_arm.c b/machines/cortex-a/tpl_machine_arm.c index e40f6e0d3..490e44656 100644 --- a/machines/cortex-a/tpl_machine_arm.c +++ b/machines/cortex-a/tpl_machine_arm.c @@ -206,6 +206,9 @@ FUNC(uint8, OS_CODE) tpl_check_stack_footprint ( CONST(tpl_proc_id, OS_APPL_DATA) proc_id) { uint8 tmp; + + (void) proc_id; + /*to do*/ tmp=0; return tmp; From 196fc1b75775fe5d0ad23b17995819d658ff9755 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Mon, 18 Sep 2023 20:26:28 +0200 Subject: [PATCH 4/7] os: Fixed two unused parameter warnings in tpl_set_event(). The 'task_id' and 'incoming_event' parameters are not used and trigger a compilation warning. Signed-off-by: Adrien Ricciardi --- os/tpl_os_kernel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os/tpl_os_kernel.c b/os/tpl_os_kernel.c index 8f7cfde0a..05bf1b438 100644 --- a/os/tpl_os_kernel.c +++ b/os/tpl_os_kernel.c @@ -1087,6 +1087,9 @@ tpl_set_event(CONST(tpl_task_id, AUTOMATIC) task_id, { result = E_OS_STATE; } +#else + (void) task_id; + (void) incoming_event; #endif return result; From bdf98435a56e4a22b7a99593545a39942b150332 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Tue, 26 Sep 2023 10:32:01 +0200 Subject: [PATCH 5/7] machines: posix: Fixed an unused parameter warning in quit(). The 'n' parameter is not used and triggers a compilation warning. Signed-off-by: Adrien Ricciardi --- machines/posix/tpl_machine_posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machines/posix/tpl_machine_posix.c b/machines/posix/tpl_machine_posix.c index 4b8709c93..45d7af863 100644 --- a/machines/posix/tpl_machine_posix.c +++ b/machines/posix/tpl_machine_posix.c @@ -185,6 +185,8 @@ void tpl_osek_func_stub( tpl_proc_id task_id ) void quit(int n) { + (void) n; + ShutdownOS(E_OK); } From 6c144b5c9136c4a62a5fa40b121a891b3c2b5b1d Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Tue, 26 Sep 2023 10:57:56 +0200 Subject: [PATCH 6/7] os: Removed two asserts in tpl_resume_all_interrupts_service() and tpl_resume_os_interrupts_service() because they were always true. The 'GET_LOCK_CNT_FOR_CORE' macro returns the 'tpl_locking_depth' variable, which is unsigned. Thus, checking if it is greater or equal to zero is always true. Signed-off-by: Adrien Ricciardi --- os/tpl_os_interrupt_kernel.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/os/tpl_os_interrupt_kernel.c b/os/tpl_os_interrupt_kernel.c index 109146474..c27d0c42f 100644 --- a/os/tpl_os_interrupt_kernel.c +++ b/os/tpl_os_interrupt_kernel.c @@ -132,9 +132,6 @@ FUNC(void, OS_CODE) tpl_suspend_all_interrupts_service(void) FUNC(void, OS_CODE) tpl_resume_all_interrupts_service(void) { GET_CURRENT_CORE_ID(core_id) - #if defined(__unix__) || defined(__APPLE__) - assert( GET_LOCK_CNT_FOR_CORE(tpl_locking_depth,core_id) >= 0 ); - #endif if( GET_LOCK_CNT_FOR_CORE(tpl_cpt_user_task_lock_All,core_id) != 0 ) { @@ -202,9 +199,6 @@ FUNC(void, OS_CODE) tpl_suspend_os_interrupts_service(void) FUNC(void, OS_CODE) tpl_resume_os_interrupts_service(void) { GET_CURRENT_CORE_ID(core_id) - #if defined(__unix__) || defined(__APPLE__) - assert(GET_LOCK_CNT_FOR_CORE(tpl_locking_depth,core_id) >= 0); - #endif if (GET_LOCK_CNT_FOR_CORE(tpl_cpt_user_task_lock_OS,core_id) != 0) { From 15c9fc6543bd66a6fc6044dabab8bbbce7651394 Mon Sep 17 00:00:00 2001 From: Adrien Ricciardi Date: Tue, 26 Sep 2023 11:50:29 +0200 Subject: [PATCH 7/7] machines: posix: Fixed an unused parameter warning in tpl_create_context_trampoline(). The 'sigid' arameter is not used and triggers a compilation warning. Signed-off-by: Adrien Ricciardi --- machines/posix/tpl_posix_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machines/posix/tpl_posix_context.c b/machines/posix/tpl_posix_context.c index c961cdd3a..28bd59ea0 100644 --- a/machines/posix/tpl_posix_context.c +++ b/machines/posix/tpl_posix_context.c @@ -79,6 +79,8 @@ FUNC(void, OS_CODE) tpl_create_context_boot(void) #include "tpl_memmap.h" FUNC(void, OS_CODE) tpl_create_context_trampoline(int sigid) { + (void) sigid; + /* 5 : new context created. We go back to tpl_init_context */ if( 0==setjmp(tpl_stat_proc_table[new_proc_id]->context->initial) ) {