1
0
Fork 0

Ignore re-assignment warnings in PVS-Studio

This commit is contained in:
krcroft 2020-04-14 19:51:14 -07:00 committed by Patryk Obara
parent 1789912212
commit 8d33524e25
2 changed files with 27 additions and 3 deletions

View file

@ -1,6 +1,30 @@
{
"version": 1,
"warnings": [
{
"CodeCurrent": 99146737,
"CodeNext": 3299936121,
"CodePrev": 2974951853,
"ErrorCode": "V570",
"FileName": "mem.h",
"Message": "The 'val' variable is assigned to itself."
},
{
"CodeCurrent": 99146737,
"CodeNext": 3299936121,
"CodePrev": 2974951853,
"ErrorCode": "V570",
"FileName": "mem.h",
"Message": "The 'val' variable is assigned to itself."
},
{
"CodeCurrent": 99146737,
"CodeNext": 3299936121,
"CodePrev": 2974951853,
"ErrorCode": "V570",
"FileName": "mem.h",
"Message": "The 'val' variable is assigned to itself."
},
{
"CodeCurrent": 432032057,
"CodeNext": 36027430,

View file

@ -84,7 +84,7 @@ static INLINE uint16_t host_readw_at(const uint8_t *arr, const uintptr_t index)
static INLINE void host_writew(uint8_t *arr, uint16_t val)
{
// Convert the host-type value to little-endian before filling array
(val) = host_to_le16(val);
val = host_to_le16(val);
memcpy(arr, &val, sizeof(val));
}
@ -117,7 +117,7 @@ static INLINE uint32_t host_readd_at(const uint8_t *arr, const uintptr_t index)
static INLINE void host_writed(uint8_t *arr, uint32_t val)
{
// Convert the host-type value to little-endian before filling array
(val) = host_to_le32(val);
val = host_to_le32(val);
memcpy(arr, &val, sizeof(val));
}
@ -144,7 +144,7 @@ static INLINE uint64_t host_readq(const uint8_t *arr)
static INLINE void host_writeq(uint8_t *arr, uint64_t val)
{
// Convert the host-type value to little-endian before filling array
(val) = host_to_le64(val);
val = host_to_le64(val);
memcpy(arr, &val, sizeof(val));
}