@@ -229,18 +229,18 @@ static BaseType_t prvIsOptionLengthValid( uint16_t usOption,
229
229
230
230
if ( uxOptionLength < uxMinOptLength )
231
231
{
232
- FreeRTOS_printf ( ( "prvIsOptionLengthValid: Length %lu of option %u is less than minimum requirement %lu \n" ,
233
- uxOptionLength ,
232
+ FreeRTOS_printf ( ( "prvIsOptionLengthValid: Length %u of option %u is less than minimum requirement %u \n" ,
233
+ ( unsigned ) uxOptionLength ,
234
234
usOption ,
235
- uxMinOptLength ) );
235
+ ( unsigned ) uxMinOptLength ) );
236
236
xReturn = pdFALSE ;
237
237
}
238
238
else if ( uxOptionLength > uxRemainingSize )
239
239
{
240
- FreeRTOS_printf ( ( "prvIsOptionLengthValid: Length %lu of option %u is larger than remaining buffer size %lu \n" ,
241
- uxOptionLength ,
240
+ FreeRTOS_printf ( ( "prvIsOptionLengthValid: Length %u of option %u is larger than remaining buffer size %u \n" ,
241
+ ( unsigned ) uxOptionLength ,
242
242
usOption ,
243
- uxRemainingSize ) );
243
+ ( unsigned ) uxRemainingSize ) );
244
244
xReturn = pdFALSE ;
245
245
}
246
246
else
@@ -972,7 +972,7 @@ static void prvSendDHCPMessage( NetworkEndPoint_t * pxEndPoint )
972
972
pxDHCPMessage -> ucTransactionID [ 1 ] = ( uint8_t ) ( ( ulTransactionID >> 8 ) & 0xffU );
973
973
pxDHCPMessage -> ucTransactionID [ 2 ] = ( uint8_t ) ( ulTransactionID & 0xffU );
974
974
EP_DHCPData .ulTransactionId = ulTransactionID ;
975
- FreeRTOS_debug_printf ( ( "Created transaction ID : 0x%06X\n" , ulTransactionID ) );
975
+ FreeRTOS_debug_printf ( ( "Created transaction ID : 0x%06X\n" , ( unsigned ) ulTransactionID ) );
976
976
}
977
977
978
978
if ( ( xRandomOk == pdPASS ) && ( EP_DHCPData .xDHCPSocket != NULL ) )
@@ -1136,7 +1136,7 @@ static BaseType_t prvDHCPv6_subOption( uint16_t usOption,
1136
1136
}
1137
1137
else
1138
1138
{
1139
- FreeRTOS_printf ( ( "prvDHCPv6_subOption: Option %u used length %lu is larger than option length %lu \n" , usOption , uxUsed , pxSet -> uxOptionLength ) );
1139
+ FreeRTOS_printf ( ( "prvDHCPv6_subOption: Option %u used length %u is larger than option length %u \n" , usOption , ( unsigned ) uxUsed , ( unsigned ) pxSet -> uxOptionLength ) );
1140
1140
xReturn = pdFALSE ;
1141
1141
}
1142
1142
@@ -1145,9 +1145,9 @@ static BaseType_t prvDHCPv6_subOption( uint16_t usOption,
1145
1145
if ( uxRemain < 4U )
1146
1146
{
1147
1147
/* Sub-option length is always larger than 4 to store option code and length. */
1148
- FreeRTOS_printf ( ( "prvDHCPv6_subOption: %s has invalid option with length %lu \n" ,
1148
+ FreeRTOS_printf ( ( "prvDHCPv6_subOption: %s has invalid option with length %u \n" ,
1149
1149
( usOption == DHCPv6_Option_NonTemporaryAddress ) ? "Address assignment" : "Prefix Delegation" ,
1150
- uxRemain ) );
1150
+ ( unsigned ) uxRemain ) );
1151
1151
xReturn = pdFALSE ;
1152
1152
break ;
1153
1153
}
@@ -1160,10 +1160,10 @@ static BaseType_t prvDHCPv6_subOption( uint16_t usOption,
1160
1160
/* Check sub-option length. */
1161
1161
if ( prvIsOptionLengthValid ( usOption2 , uxLength2 , pxMessage -> uxSize - pxMessage -> uxIndex ) != pdTRUE )
1162
1162
{
1163
- FreeRTOS_printf ( ( "prvDHCPv6_subOption: %u has invalid length %u, remaining buffer size %lu \n" ,
1163
+ FreeRTOS_printf ( ( "prvDHCPv6_subOption: %u has invalid length %u, remaining buffer size %u \n" ,
1164
1164
usOption2 ,
1165
- uxLength2 ,
1166
- pxMessage -> uxSize - pxMessage -> uxIndex ) );
1165
+ ( unsigned ) uxLength2 ,
1166
+ ( unsigned ) ( pxMessage -> uxSize - pxMessage -> uxIndex ) ) );
1167
1167
xReturn = pdFALSE ;
1168
1168
break ;
1169
1169
}
@@ -1237,10 +1237,10 @@ static BaseType_t prvDHCPv6_handleOption( struct xNetworkEndPoint * pxEndPoint,
1237
1237
1238
1238
if ( prvIsOptionLengthValid ( usOption , pxSet -> uxOptionLength , pxMessage -> uxSize - pxMessage -> uxIndex ) != pdTRUE )
1239
1239
{
1240
- FreeRTOS_printf ( ( "prvDHCPv6_handleOption: Option %u has invalid length %lu , remaining buffer size %lu \n" ,
1240
+ FreeRTOS_printf ( ( "prvDHCPv6_handleOption: Option %u has invalid length %u , remaining buffer size %u \n" ,
1241
1241
usOption ,
1242
- pxSet -> uxOptionLength ,
1243
- pxMessage -> uxSize - pxMessage -> uxIndex ) );
1242
+ ( unsigned ) pxSet -> uxOptionLength ,
1243
+ ( unsigned ) ( pxMessage -> uxSize - pxMessage -> uxIndex ) ) );
1244
1244
xReady = pdTRUE ;
1245
1245
}
1246
1246
@@ -1442,7 +1442,7 @@ static BaseType_t prvDHCPv6Analyse( struct xNetworkEndPoint * pxEndPoint,
1442
1442
FreeRTOS_printf ( ( "prvDHCPv6Analyse: Message %u transaction ID 0x%06X is different from sent ID 0x%06X\n" ,
1443
1443
( unsigned ) pxDHCPMessage -> uxMessageType ,
1444
1444
( unsigned ) pxDHCPMessage -> ulTransactionID ,
1445
- EP_DHCPData .ulTransactionId ) );
1445
+ ( unsigned ) EP_DHCPData .ulTransactionId ) );
1446
1446
1447
1447
xResult = pdFAIL ;
1448
1448
}
0 commit comments