Address MISRA errors of various kinds (#234)

* MISRA 21.15 changes

* MISRA 11.8 changes
This commit is contained in:
Aniruddha Kanhere 2020-09-01 12:59:50 -07:00 committed by GitHub
parent a72f040861
commit 0341050048
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 44 deletions

View file

@ -846,7 +846,7 @@ static const DNSMessage_t xDefaultPartDNSHeader =
/* Copy in the const part of the header. Intentionally using different
* pointers with memcpy() to put the information in to correct place. */
( void ) memcpy( pucUDPPayloadBuffer, &( xDefaultPartDNSHeader ), sizeof( xDefaultPartDNSHeader ) );
( void ) memcpy( ( void * ) pucUDPPayloadBuffer, ( const void * ) ( &( xDefaultPartDNSHeader ) ), sizeof( xDefaultPartDNSHeader ) );
/* Write in a unique identifier. Cast the Payload Buffer to DNSMessage_t
* to easily access fields of the DNS Message. */
@ -1308,8 +1308,8 @@ BaseType_t xReturn = pdTRUE;
{
/* Copy the IP address out of the record. Using different pointers
* to copy only the portion we want is intentional here. */
( void ) memcpy( &( ulIPAddress ),
&( pucByte[ sizeof( DNSAnswerRecord_t ) ] ),
( void ) memcpy( ( void * ) ( &( ulIPAddress ) ),
( const void * ) ( &( pucByte[ sizeof( DNSAnswerRecord_t ) ] ) ),
sizeof( uint32_t ) );
#if( ipconfigDNS_USE_CALLBACKS == 1 )