diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c index f4c5b809b..886c9d782 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/TCPEchoClient_SingleTasks.c @@ -216,7 +216,7 @@ /* Send the string to the socket. */ lTransmitted = FreeRTOS_send( xSocket, /* The socket being sent to. */ ( void * ) pcTransmittedString, /* The data being sent. */ - lStringLength, /* The length of the data being sent. */ + ( size_t ) lStringLength, /* The length of the data being sent. */ 0 ); /* No flags. */ printf( "FreeRTOS_send returned...transmitted %ld\n", lTransmitted ); @@ -237,10 +237,10 @@ /* Receive data echoed back to the socket. */ while( xReceivedBytes < lTransmitted ) { - xReturned = FreeRTOS_recv( xSocket, /* The socket being received from. */ - &( pcReceivedString[ xReceivedBytes ] ), /* The buffer into which the received data will be written. */ - lStringLength - xReceivedBytes, /* The size of the buffer provided to receive the data. */ - 0 ); /* No flags. */ + xReturned = FreeRTOS_recv( xSocket, /* The socket being received from. */ + &( pcReceivedString[ xReceivedBytes ] ), /* The buffer into which the received data will be written. */ + ( size_t ) ( lStringLength - xReceivedBytes ), /* The size of the buffer provided to receive the data. */ + 0 ); /* No flags. */ if( xReturned < 0 ) { @@ -267,9 +267,9 @@ if( xReceivedBytes > 0 ) { /* Compare the transmitted string to the received string. */ - configASSERT( strncmp( pcReceivedString, pcTransmittedString, lTransmitted ) == 0 ); + configASSERT( strncmp( pcReceivedString, pcTransmittedString, ( size_t ) lTransmitted ) == 0 ); - if( strncmp( pcReceivedString, pcTransmittedString, lTransmitted ) == 0 ) + if( strncmp( pcReceivedString, pcTransmittedString, ( size_t ) lTransmitted ) == 0 ) { /* The echo reply was received without error. */ ulTxRxCycles[ xInstance ]++; @@ -343,7 +343,7 @@ do { ( void ) xApplicationGetRandomNumber( &ulRandomNumber ); - lCharactersToAdd = ulRandomNumber % ( ulBufferLength - 20UL ); + lCharactersToAdd = ( BaseType_t ) ( ulRandomNumber % ( ulBufferLength - 20UL ) ); } while( ( lCharactersToAdd == 0 ) || ( lCharactersToAdd < lMinimumLength ) ); /* Must be at least enough to add the unique text to the start of the string later. */ /* Fill the buffer. */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c index 8de215971..5e8835558 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c @@ -285,7 +285,8 @@ static UBaseType_t uxRand( void ) /* Utility function to generate a pseudo random number. */ ulNextRand = ( ulMultiplier * ulNextRand ) + ulIncrement; - return( ( int ) ( ulNextRand >> 16UL ) & 0x7fffUL ); + + return ( ulNextRand >> 16UL ) & 0x7fffUL; } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c b/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c index b974ffe75..760e2a811 100644 --- a/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c +++ b/FreeRTOS/Demo/Common/Minimal/StreamBufferInterrupt.c @@ -182,7 +182,8 @@ static void prvReceivingTask( void * pvParameters ) void vBasicStreamBufferSendFromISR( void ) { static size_t xNextByteToSend = 0; - const BaseType_t xCallsBetweenSends = 100, xBytesToSend = 4; + const size_t xBytesToSend = 4; + const BaseType_t xCallsBetweenSends = 100; static BaseType_t xCallCount = 0; /* Is it time to write to the stream buffer again? */ diff --git a/FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c b/FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c index 1a136fabc..35ccef832 100644 --- a/FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c +++ b/FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c @@ -783,7 +783,7 @@ static void prvSuspendedTaskTimerTestCallback( TimerHandle_t xExpiredTimer ) static void prvNotifyingTimerCallback( TimerHandle_t xNotUsed ) { - static BaseType_t uxIndexToNotify = 0; + static UBaseType_t uxIndexToNotify = 0; ( void ) xNotUsed;