]> git.sur5r.net Git - freertos/commitdiff
A few additional casts to keep the Renesas RX compiler happy.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 29 May 2014 13:39:48 +0000 (13:39 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 29 May 2014 13:39:48 +0000 (13:39 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2245 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/Common/Minimal/IntQueue.c
FreeRTOS/Demo/Common/Minimal/QPeek.c
FreeRTOS/Demo/Common/Minimal/TimerDemo.c

index 2a36c48cd830ed0f551aa0b6fd467ce75079cb46..b58c05f3b98d236ac4b9f8b95193e182e190c1f8 100644 (file)
@@ -264,7 +264,7 @@ static void prvRecordValue_NormallyFull( unsigned portBASE_TYPE uxValue, unsigne
                }\r
 \r
                /* Log that this value has been received. */\r
-               ucNormallyFullReceivedValues[ uxValue ] = uxSource;\r
+               ucNormallyFullReceivedValues[ uxValue ] = ( unsigned char ) uxSource;\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -281,7 +281,7 @@ static void prvRecordValue_NormallyEmpty( unsigned portBASE_TYPE uxValue, unsign
                }\r
 \r
                /* Log that this value has been received. */\r
-               ucNormallyEmptyReceivedValues[ uxValue ] = uxSource;\r
+               ucNormallyEmptyReceivedValues[ uxValue ] = ( unsigned char ) uxSource;\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -657,7 +657,8 @@ unsigned portBASE_TYPE uxValue, uxTxed = 9999;
 \r
 portBASE_TYPE xFirstTimerHandler( void )\r
 {\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, uxRxedValue;\r
+portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+unsigned portBASE_TYPE uxRxedValue;\r
 static unsigned portBASE_TYPE uxNextOperation = 0;\r
 \r
        /* Called from a timer interrupt.  Perform various read and write\r
index fee1f63aa14f4df3626a11f02ff6ea27c84199e2..aa473e5cfe6f305db81f82cb8ab009d4d144e110 100644 (file)
@@ -469,6 +469,6 @@ static unsigned long ulLastLoopCounter = 0;
        /* Errors detected in the task itself will have latched xErrorDetected\r
        to true. */\r
 \r
-       return !xErrorDetected;\r
+       return ( portBASE_TYPE ) !xErrorDetected;\r
 }\r
 \r
index 0b9aadf6111383e10b668766e97ee2b3e8eb11b6..9a8e52510042669a9144a8b62fe0954eeec224b2 100644 (file)
@@ -410,7 +410,7 @@ TickType_t xBlockPeriod, xTimerPeriod, xExpectedNumber;
                xExpectedNumber = xBlockPeriod / xTimerPeriod;\r
                \r
                ucMaxAllowableValue = ( ( unsigned char ) xExpectedNumber ) ;\r
-               ucMinAllowableValue = ( ( unsigned char ) xExpectedNumber - ( unsigned char ) 1 );\r
+               ucMinAllowableValue = ( unsigned char ) ( ( unsigned char ) xExpectedNumber - ( unsigned char ) 1 ); /* Weird casting to try and please all compilers. */\r
 \r
                if( ( ucAutoReloadTimerCounters[ ucTimer ] < ucMinAllowableValue ) ||\r
                        ( ucAutoReloadTimerCounters[ ucTimer ] > ucMaxAllowableValue )\r