Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Noreturn attribute in template port for static analysis #1060

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/cmake_example/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

/*-----------------------------------------------------------*/

static void exampleTask( void * parameters );
static void exampleTask( void * parameters ) __attribute__( ( noreturn ) );

/*-----------------------------------------------------------*/

Expand All @@ -62,7 +62,7 @@ static void exampleTask( void * parameters )
}
/*-----------------------------------------------------------*/

void main( void )
int main( void )
{
static StaticTask_t exampleTaskTCB;
static StackType_t exampleTaskStack[ configMINIMAL_STACK_SIZE ];
Expand All @@ -84,6 +84,8 @@ void main( void )
{
/* Should not reach here. */
}

return 0;
}
/*-----------------------------------------------------------*/

Expand Down
2 changes: 1 addition & 1 deletion portable/template/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extern void vPortYield( void );
#define portYIELD() vPortYield()

/* Task function macros as described on the FreeRTOS.org WEB site. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters ) __attribute__( ( noreturn ) )
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )

#if ( configNUMBER_OF_CORES > 1 )
Expand Down
Loading