From cd0b7fc271de55d3358761a292275e0e9a491a0a Mon Sep 17 00:00:00 2001 From: Kevin Thibedeau Date: Mon, 8 Nov 2021 16:51:25 -0500 Subject: [PATCH] Build with -Wmissing-prototypes flags vPortYieldFromISR() in the Posix port. (#409) There's already a portYIELD_FROM_ISR() macro that calls vPortYield() which wraps the FromISR code. It doesn't appear that vPortYieldFromISR() is intended to be publicly accessible in this port so I've marked it as private to silence the warning. event_create() also got flagged due to missing void in prototype. Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> --- portable/ThirdParty/GCC/Posix/port.c | 5 +++-- portable/ThirdParty/GCC/Posix/utils/wait_for_event.c | 2 +- portable/ThirdParty/GCC/Posix/utils/wait_for_event.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/portable/ThirdParty/GCC/Posix/port.c b/portable/ThirdParty/GCC/Posix/port.c index e80f7518f..5cb70a514 100644 --- a/portable/ThirdParty/GCC/Posix/port.c +++ b/portable/ThirdParty/GCC/Posix/port.c @@ -111,6 +111,7 @@ static void prvSuspendSelf( Thread_t * thread); static void prvResumeThread( Thread_t * xThreadId ); static void vPortSystemTickHandler( int sig ); static void vPortStartFirstTask( void ); +static void prvPortYieldFromISR( void ); /*-----------------------------------------------------------*/ static void prvFatalError( const char *pcCall, int iErrno ) @@ -267,7 +268,7 @@ void vPortExitCritical( void ) } /*-----------------------------------------------------------*/ -void vPortYieldFromISR( void ) +static void prvPortYieldFromISR( void ) { Thread_t *xThreadToSuspend; Thread_t *xThreadToResume; @@ -286,7 +287,7 @@ void vPortYield( void ) { vPortEnterCritical(); - vPortYieldFromISR(); + prvPortYieldFromISR(); vPortExitCritical(); } diff --git a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c index 894c6314f..144eba6c8 100644 --- a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c +++ b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c @@ -39,7 +39,7 @@ struct event bool event_triggered; }; -struct event * event_create() +struct event * event_create( void ) { struct event * ev = malloc( sizeof( struct event ) ); diff --git a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.h b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.h index 36603392f..65e3e5481 100644 --- a/portable/ThirdParty/GCC/Posix/utils/wait_for_event.h +++ b/portable/ThirdParty/GCC/Posix/utils/wait_for_event.h @@ -34,7 +34,7 @@ struct event; -struct event * event_create(); +struct event * event_create( void ); void event_delete( struct event * ); bool event_wait( struct event * ev ); bool event_wait_timed( struct event * ev,