]> git.sur5r.net Git - freertos/commitdiff
Minor tidying up of IntQueue.c to prevent compiler warnings. No functional difference.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 29 Aug 2010 17:13:46 +0000 (17:13 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 29 Aug 2010 17:13:46 +0000 (17:13 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1070 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/Common/Minimal/IntQueue.c

index a7d29c42e9d63c9e1932216fef4dc10bfc04291e..4e717335382e7a68beb78fbaced56646beae8431 100644 (file)
@@ -33,9 +33,9 @@
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT\r
     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
-    more details. You should have received a copy of the GNU General Public \r
-    License and the FreeRTOS license exception along with FreeRTOS; if not it \r
-    can be viewed here: http://www.freertos.org/a00114.html and also obtained \r
+    more details. You should have received a copy of the GNU General Public\r
+    License and the FreeRTOS license exception along with FreeRTOS; if not it\r
+    can be viewed here: http://www.freertos.org/a00114.html and also obtained\r
     by writing to Richard Barry, contact details for whom are available on the\r
     FreeRTOS WEB site.\r
 \r
     by writing to Richard Barry, contact details for whom are available on the\r
     FreeRTOS WEB site.\r
 \r
@@ -172,7 +172,7 @@ static unsigned portBASE_TYPE uxHighPriorityLoops1 = 0, uxHighPriorityLoops2 = 0
 /* Any unexpected behaviour sets xErrorStatus to fail and log the line that\r
 caused the error in xErrorLine. */\r
 static portBASE_TYPE xErrorStatus = pdPASS;\r
 /* Any unexpected behaviour sets xErrorStatus to fail and log the line that\r
 caused the error in xErrorLine. */\r
 static portBASE_TYPE xErrorStatus = pdPASS;\r
-static unsigned portBASE_TYPE xErrorLine = ( unsigned portBASE_TYPE ) 0;\r
+static volatile unsigned portBASE_TYPE xErrorLine = ( unsigned portBASE_TYPE ) 0;\r
 \r
 /* Used for sequencing between tasks. */\r
 static portBASE_TYPE xWasSuspended = pdFALSE;\r
 \r
 /* Used for sequencing between tasks. */\r
 static portBASE_TYPE xWasSuspended = pdFALSE;\r
@@ -392,14 +392,13 @@ unsigned portBASE_TYPE uxRxed, ux, uxTask1, uxTask2, uxErrorCount1 = 0, uxErrorC
 static void prvLowerPriorityNormallyEmptyTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValue, uxRxed;\r
 static void prvLowerPriorityNormallyEmptyTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValue, uxRxed;\r
-portBASE_TYPE xQueueStatus;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
 \r
        for( ;; )\r
        {\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
 \r
        for( ;; )\r
        {\r
-               if( ( xQueueStatus = xQueueReceive( xNormallyEmptyQueue, &uxRxed, intqONE_TICK_DELAY ) ) != errQUEUE_EMPTY )\r
+               if( xQueueReceive( xNormallyEmptyQueue, &uxRxed, intqONE_TICK_DELAY ) != errQUEUE_EMPTY )\r
                {\r
                        /* We should only obtain a value when the high priority task is\r
                        suspended. */\r
                {\r
                        /* We should only obtain a value when the high priority task is\r
                        suspended. */\r
@@ -441,7 +440,6 @@ portBASE_TYPE xQueueStatus;
 static void prv1stHigherPriorityNormallyFullTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValueToTx, ux;\r
 static void prv1stHigherPriorityNormallyFullTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValueToTx, ux;\r
-portBASE_TYPE xQueueStatus;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -469,7 +467,7 @@ portBASE_TYPE xQueueStatus;
                }\r
                portEXIT_CRITICAL();\r
 \r
                }\r
                portEXIT_CRITICAL();\r
 \r
-               if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) ) != pdPASS )\r
+               if( xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) != pdPASS )\r
                {\r
                        /* intqHIGH_PRIORITY_TASK2 is never suspended so we would not\r
                        expect it to ever time out. */\r
                {\r
                        /* intqHIGH_PRIORITY_TASK2 is never suspended so we would not\r
                        expect it to ever time out. */\r
@@ -531,7 +529,6 @@ portBASE_TYPE xQueueStatus;
 static void prv2ndHigherPriorityNormallyFullTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValueToTx, ux;\r
 static void prv2ndHigherPriorityNormallyFullTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValueToTx, ux;\r
-portBASE_TYPE xQueueStatus;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -559,7 +556,7 @@ portBASE_TYPE xQueueStatus;
                }\r
                portEXIT_CRITICAL();\r
 \r
                }\r
                portEXIT_CRITICAL();\r
 \r
-               if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) ) != pdPASS )\r
+               if( xQueueSend( xNormallyFullQueue, &uxValueToTx, intqSHORT_DELAY ) != pdPASS )\r
                {\r
                        if( xWasSuspended != pdTRUE )\r
                        {\r
                {\r
                        if( xWasSuspended != pdTRUE )\r
                        {\r
@@ -578,14 +575,13 @@ portBASE_TYPE xQueueStatus;
 static void prvLowerPriorityNormallyFullTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValue, uxTxed = 9999;\r
 static void prvLowerPriorityNormallyFullTask( void *pvParameters )\r
 {\r
 unsigned portBASE_TYPE uxValue, uxTxed = 9999;\r
-portBASE_TYPE xQueueStatus;\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
 \r
        for( ;; )\r
        {\r
 \r
        /* The parameters are not being used so avoid compiler warnings. */\r
        ( void ) pvParameters;\r
 \r
        for( ;; )\r
        {\r
-               if( ( xQueueStatus = xQueueSend( xNormallyFullQueue, &uxTxed, intqONE_TICK_DELAY ) ) != errQUEUE_FULL )\r
+               if( xQueueSend( xNormallyFullQueue, &uxTxed, intqONE_TICK_DELAY ) != errQUEUE_FULL )\r
                {\r
                        /* We would only expect to succeed when the higher priority task\r
                        is suspended. */\r
                {\r
                        /* We would only expect to succeed when the higher priority task\r
                        is suspended. */\r