]> git.sur5r.net Git - freertos/commitdiff
Void a few unused return values and make casting more C++ friendly.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 23 Jul 2013 09:53:24 +0000 (09:53 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 23 Jul 2013 09:53:24 +0000 (09:53 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1995 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/croutine.c
FreeRTOS/Source/include/semphr.h
FreeRTOS/Source/queue.c
FreeRTOS/Source/tasks.c

index 207b5c1e8e74f57282bd53795fd3bca8dd7271a7..f957aabdfdc25b62895e3c3a06b20d70a1b0f084 100644 (file)
@@ -201,7 +201,7 @@ portTickType xTimeToWake;
        /* We must remove ourselves from the ready list before adding\r
        ourselves to the blocked list as the same list item is used for\r
        both lists. */\r
-       uxListRemove( ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );\r
+       ( void ) uxListRemove( ( xListItem * ) &( pxCurrentCoRoutine->xGenericListItem ) );\r
 \r
        /* The list item will be inserted in wake time order. */\r
        listSET_LIST_ITEM_VALUE( &( pxCurrentCoRoutine->xGenericListItem ), xTimeToWake );\r
@@ -241,11 +241,11 @@ static void prvCheckPendingReadyList( void )
                portDISABLE_INTERRUPTS();\r
                {\r
                        pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( (&xPendingReadyCoRoutineList) );\r
-                       uxListRemove( &( pxUnblockedCRCB->xEventListItem ) );\r
+                       ( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) );\r
                }\r
                portENABLE_INTERRUPTS();\r
 \r
-               uxListRemove( &( pxUnblockedCRCB->xGenericListItem ) );\r
+               ( void ) uxListRemove( &( pxUnblockedCRCB->xGenericListItem ) );\r
                prvAddCoRoutineToReadyQueue( pxUnblockedCRCB );\r
        }\r
 }\r
@@ -296,7 +296,7 @@ corCRCB *pxCRCB;
                                /* Is the co-routine waiting on an event also? */\r
                                if( pxCRCB->xEventListItem.pvContainer )\r
                                {\r
-                                       uxListRemove( &( pxCRCB->xEventListItem ) );\r
+                                       ( void ) uxListRemove( &( pxCRCB->xEventListItem ) );\r
                                }\r
                        }\r
                        portENABLE_INTERRUPTS();\r
@@ -368,7 +368,7 @@ signed portBASE_TYPE xReturn;
        event lists and the pending ready list.  This function assumes that a\r
        check has already been made to ensure pxEventList is not empty. */\r
        pxUnblockedCRCB = ( corCRCB * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList );\r
-       uxListRemove( &( pxUnblockedCRCB->xEventListItem ) );\r
+       ( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) );\r
        vListInsertEnd( ( xList * ) &( xPendingReadyCoRoutineList ), &( pxUnblockedCRCB->xEventListItem ) );\r
 \r
        if( pxUnblockedCRCB->uxPriority >= pxCurrentCoRoutine->uxPriority )\r
index 88e69dcd52ab57b79e75e5d3821fb45c5a2bd0bb..63706d3e551c6fda6290e1f45488b2f5ffcbd91e 100644 (file)
@@ -121,7 +121,7 @@ typedef xQueueHandle xSemaphoreHandle;
                ( xSemaphore ) = xQueueGenericCreate( ( unsigned portBASE_TYPE ) 1, semSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_BINARY_SEMAPHORE ); \\r
                if( ( xSemaphore ) != NULL )                                                                                                                                                                                                                    \\r
                {                                                                                                                                                                                                                                                                               \\r
-                       xSemaphoreGive( ( xSemaphore ) );                                                                                                                                                                                                       \\r
+                       ( void ) xSemaphoreGive( ( xSemaphore ) );                                                                                                                                                                                                      \\r
                }                                                                                                                                                                                                                                                                               \\r
        }\r
 \r
index c587b1487d6ed766836c7b4429473c4603362e24..c5c1269e1c441120c42a8cf771bf424e671c590f 100644 (file)
@@ -824,7 +824,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
                                                        {\r
                                                                /* Record the information required to implement\r
                                                                priority inheritance should it become necessary. */\r
-                                                               pxQueue->pxMutexHolder = ( void * ) xTaskGetCurrentTaskHandle();\r
+                                                               pxQueue->pxMutexHolder = ( signed char * ) xTaskGetCurrentTaskHandle();\r
                                                        }\r
                                                }\r
                                                #endif\r
@@ -1073,7 +1073,7 @@ xQUEUE * const pxQueue = ( xQUEUE * ) xQueue;
                                                {\r
                                                        /* Record the information required to implement\r
                                                        priority inheritance should it become necessary. */\r
-                                                       pxQueue->pxMutexHolder = ( void * ) xTaskGetCurrentTaskHandle(); /*lint !e961 Cast is not redundant as xTaskHandle is a typedef. */\r
+                                                       pxQueue->pxMutexHolder = ( signed char * ) xTaskGetCurrentTaskHandle(); /*lint !e961 Cast is not redundant as xTaskHandle is a typedef. */\r
                                                }\r
                                        }\r
                                        #endif\r
@@ -1742,7 +1742,7 @@ signed portBASE_TYPE xReturn;
                                        pxQueue->u.pcReadFrom = pxQueue->pcHead;\r
                                }\r
                                --( pxQueue->uxMessagesWaiting );\r
-                               memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
+                               ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
 \r
                                xReturn = pdPASS;\r
 \r
@@ -1822,7 +1822,7 @@ signed portBASE_TYPE xReturn;
                                pxQueue->u.pcReadFrom = pxQueue->pcHead;\r
                        }\r
                        --( pxQueue->uxMessagesWaiting );\r
-                       memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
+                       ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( unsigned ) pxQueue->uxItemSize );\r
 \r
                        if( ( *pxCoRoutineWoken ) == pdFALSE )\r
                        {\r
index 0c251349443ea01ab442f8357c6010541bf282aa..b280645b1e03e2ce6dbf2bcd85bfded62113cd63 100644 (file)
@@ -2182,7 +2182,7 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
                                                traceLOW_POWER_IDLE_END();\r
                                        }\r
                                }\r
-                               xTaskResumeAll();\r
+                               ( void ) xTaskResumeAll();\r
                        }\r
                }\r
                #endif /* configUSE_TICKLESS_IDLE */\r