]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/queue.c
Add software timer use to the new MPU demo.
[freertos] / FreeRTOS / Source / queue.c
index d2a628db297583f0ad16a39eda35d4916ac29b1e..5901174bf626c33a00794f25da47752086ea70f6 100644 (file)
@@ -1052,7 +1052,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                        {\r
                                /* Increment the lock count so the task that unlocks the queue\r
                                knows that data was posted while it was locked. */\r
-                               pxQueue->cTxLock = cTxLock + 1;\r
+                               pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );\r
                        }\r
 \r
                        xReturn = pdPASS;\r
@@ -1217,7 +1217,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                        {\r
                                /* Increment the lock count so the task that unlocks the queue\r
                                knows that data was posted while it was locked. */\r
-                               pxQueue->cTxLock = cTxLock + 1;\r
+                               pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 );\r
                        }\r
 \r
                        xReturn = pdPASS;\r
@@ -1505,7 +1505,7 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                        {\r
                                /* Increment the lock count so the task that unlocks the queue\r
                                knows that data was removed while it was locked. */\r
-                               pxQueue->cRxLock = cRxLock + 1;\r
+                               pxQueue->cRxLock = ( int8_t ) ( cRxLock + 1 );\r
                        }\r
 \r
                        xReturn = pdPASS;\r
@@ -1654,6 +1654,12 @@ Queue_t * const pxQueue = ( Queue_t * ) xQueue;
                        mtCOVERAGE_TEST_MARKER();\r
                }\r
        }\r
+       #else\r
+       {\r
+               /* The queue must have been statically allocated, so is not going to be\r
+               deleted.  Avoid compiler warnings about the unused parameter. */\r
+               ( void ) pxQueue;\r
+       }\r
        #endif /* configSUPPORT_DYNAMIC_ALLOCATION */\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -2534,7 +2540,7 @@ BaseType_t xReturn;
                        }\r
                        else\r
                        {\r
-                               pxQueueSetContainer->cTxLock = cTxLock + 1;\r
+                               pxQueueSetContainer->cTxLock = ( int8_t ) ( cTxLock + 1 );\r
                        }\r
                }\r
                else\r