]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/timers.c
Clean up lint errors.
[freertos] / FreeRTOS / Source / timers.c
index e49587f5115dbbe2e23a7ecfb53752783fb98911..c020036632ef3304ab234993c526c4995ef6c2e6 100644 (file)
@@ -248,12 +248,12 @@ static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, BaseTy
  * Called after a Timer_t structure has been allocated either statically or\r
  * dynamically to fill in the structure's members.\r
  */\r
-static void prvInitialiseNewTimer(     const char * const pcTimerName,\r
+static void prvInitialiseNewTimer(     const char * const pcTimerName,                 /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
                                                                        const TickType_t xTimerPeriodInTicks,\r
                                                                        const UBaseType_t uxAutoReload,\r
                                                                        void * const pvTimerID,\r
                                                                        TimerCallbackFunction_t pxCallbackFunction,\r
-                                                                       Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+                                                                       Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION;\r
 /*-----------------------------------------------------------*/\r
 \r
 BaseType_t xTimerCreateTimerTask( void )\r
@@ -311,11 +311,11 @@ BaseType_t xReturn = pdFAIL;
 \r
 #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
 \r
-       TimerHandle_t xTimerCreate(     const char * const pcTimerName,\r
+       TimerHandle_t xTimerCreate(     const char * const pcTimerName,                 /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
                                                                const TickType_t xTimerPeriodInTicks,\r
                                                                const UBaseType_t uxAutoReload,\r
                                                                void * const pvTimerID,\r
-                                                               TimerCallbackFunction_t pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+                                                               TimerCallbackFunction_t pxCallbackFunction )\r
        {\r
        Timer_t *pxNewTimer;\r
 \r
@@ -343,12 +343,12 @@ BaseType_t xReturn = pdFAIL;
 \r
 #if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
 \r
-       TimerHandle_t xTimerCreateStatic(       const char * const pcTimerName,\r
+       TimerHandle_t xTimerCreateStatic(       const char * const pcTimerName,         /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
                                                                                const TickType_t xTimerPeriodInTicks,\r
                                                                                const UBaseType_t uxAutoReload,\r
                                                                                void * const pvTimerID,\r
                                                                                TimerCallbackFunction_t pxCallbackFunction,\r
-                                                                               StaticTimer_t *pxTimerBuffer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+                                                                               StaticTimer_t *pxTimerBuffer )\r
        {\r
        Timer_t *pxNewTimer;\r
 \r
@@ -385,12 +385,12 @@ BaseType_t xReturn = pdFAIL;
 #endif /* configSUPPORT_STATIC_ALLOCATION */\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvInitialiseNewTimer(     const char * const pcTimerName,\r
+static void prvInitialiseNewTimer(     const char * const pcTimerName,                 /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
                                                                        const TickType_t xTimerPeriodInTicks,\r
                                                                        const UBaseType_t uxAutoReload,\r
                                                                        void * const pvTimerID,\r
                                                                        TimerCallbackFunction_t pxCallbackFunction,\r
-                                                                       Timer_t *pxNewTimer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+                                                                       Timer_t *pxNewTimer )\r
 {\r
        /* 0 is not a valid value for xTimerPeriodInTicks. */\r
        configASSERT( ( xTimerPeriodInTicks > 0 ) );\r
@@ -760,7 +760,7 @@ TickType_t xTimeNow;
                        software timer. */\r
                        pxTimer = xMessage.u.xTimerParameters.pxTimer;\r
 \r
-                       if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE )\r
+                       if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */\r
                        {\r
                                /* The timer is in a list, remove it. */\r
                                ( void ) uxListRemove( &( pxTimer->xTimerListItem ) );\r
@@ -945,10 +945,10 @@ static void prvCheckForValidListAndQueue( void )
                        {\r
                                /* The timer queue is allocated statically in case\r
                                configSUPPORT_DYNAMIC_ALLOCATION is 0. */\r
-                               static StaticQueue_t xStaticTimerQueue;\r
-                               static uint8_t ucStaticTimerQueueStorage[ configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ];\r
+                               static StaticQueue_t xStaticTimerQueue; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */\r
+                               static uint8_t ucStaticTimerQueueStorage[ ( size_t ) configTIMER_QUEUE_LENGTH * sizeof( DaemonTaskMessage_t ) ]; /*lint !e956 Ok to declare in this manner to prevent additional conditional compilation guards in other locations. */\r
 \r
-                               xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );\r
+                               xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue );\r
                        }\r
                        #else\r
                        {\r
@@ -991,7 +991,7 @@ Timer_t *pxTimer = ( Timer_t * ) xTimer;
                /* Checking to see if it is in the NULL list in effect checks to see if\r
                it is referenced from either the current or the overflow timer lists in\r
                one go, but the logic has to be reversed, hence the '!'. */\r
-               xTimerIsInActiveList = ( BaseType_t ) !( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) );\r
+               xTimerIsInActiveList = ( BaseType_t ) !( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) ); /*lint !e961. Cast is only redundant when NULL is passed into the macro. */\r
        }\r
        taskEXIT_CRITICAL();\r
 \r