From 6f2060cb00b47c4f5ce1101c1d90dc8c8d663b7a Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 31 Oct 2012 13:30:44 +0000 Subject: [PATCH] Add warning suppression to IAR header. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1808 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/include/timers.h | 2 +- FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h | 6 ++++++ FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h | 6 ++++++ FreeRTOS/Source/tasks.c | 2 +- FreeRTOS/Source/timers.c | 2 +- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/FreeRTOS/Source/include/timers.h b/FreeRTOS/Source/include/timers.h index 1ee5b9cb3..0d998a508 100644 --- a/FreeRTOS/Source/include/timers.h +++ b/FreeRTOS/Source/include/timers.h @@ -232,7 +232,7 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer ); * for( ;; ); * } */ -xTimerHandle xTimerCreate( const signed char *pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void * pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; +xTimerHandle xTimerCreate( const signed char * const pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void * pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; /** * void *pvTimerGetTimerID( xTimerHandle xTimer ); diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h index 8116bac8d..1c1f78b80 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h @@ -165,6 +165,12 @@ not necessary for to use this port. They are defined so the common demo files /* portNOP() is not required by this port. */ #define portNOP() +/* Suppress warnings that are generated by the IAR tools, but cannot be fixed in +the source code because to do so would cause other compilers to generate +warnings. */ +#pragma diag_suppress=Pe191 +#pragma diag_suppress=Pa082 + #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h index 676660690..fbb4e0803 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h @@ -171,6 +171,12 @@ not necessary for to use this port. They are defined so the common demo files /* portNOP() is not required by this port. */ #define portNOP() +/* Suppress warnings that are generated by the IAR tools, but cannot be fixed in +the source code because to do so would cause other compilers to generate +warnings. */ +#pragma diag_suppress=Pe191 +#pragma diag_suppress=Pa082 + #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index a7800fcc1..ec8a0520e 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -2448,7 +2448,7 @@ tskTCB *pxNewTCB; } #endif - sprintf( pcStatusString, ( char * ) "%s\t\t%c\t%u\t%u\t%u\r\n", pxNextTCB->pcTaskName, cStatus, ( unsigned int ) pxNextTCB->uxPriority, usStackRemaining, ( unsigned int ) pxNextTCB->uxTCBNumber ); + sprintf( pcStatusString, ( char * ) "%s\t\t%c\t%u\t%u\t%u\r\n", pxNextTCB->pcTaskName, cStatus, ( unsigned int ) pxNextTCB->uxPriority, ( unsigned int ) usStackRemaining, ( unsigned int ) pxNextTCB->uxTCBNumber ); strcat( ( char * ) pcWriteBuffer, ( char * ) pcStatusString ); } while( pxNextTCB != pxFirstTCB ); diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/Source/timers.c index d9105052c..f8cb7f862 100644 --- a/FreeRTOS/Source/timers.c +++ b/FreeRTOS/Source/timers.c @@ -217,7 +217,7 @@ portBASE_TYPE xReturn = pdFAIL; } /*-----------------------------------------------------------*/ -xTimerHandle xTimerCreate( const signed char *pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void *pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) +xTimerHandle xTimerCreate( const signed char * const pcTimerName, portTickType xTimerPeriodInTicks, unsigned portBASE_TYPE uxAutoReload, void *pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) { xTIMER *pxNewTimer; -- 2.39.5