cppcheck: Fix Shifting signed 32-bit value by 31 bits is implementation-defined behaviour

cppcheck emits a warning:
`Shifting signed 32-bit value by 31 bits is implementation-defined behaviour`, which is correct.

=> Add U suffix to constant to fix the issue

Signed-off-by: Peter Huewe <Peter.Huewe@infineon.com>
This commit is contained in:
Peter Huewe
2022-06-07 15:56:20 +02:00
committed by WenXin
parent 8c91c1f883
commit 3d55476179

View File

@@ -951,7 +951,7 @@ static int print_capability_flags(uint8_t *response_buf, uint8_t cap_selector)
tmp = ((propertyValue & (1<<2)) == 0? 0:1); // Check bit 2 value.
printf("Eh Enable: %i %s", (tmp), ((tmp)? "SET\n" : "CLEAR\n"));
//bit 30:3 = reserved
tmp = ((propertyValue & (1<<31)) == 0? 0:1); // Check bit 31 value.
tmp = ((propertyValue & (1U<<31)) == 0? 0:1); // Check bit 31 value.
printf("Orderly: %i %s", (tmp), ((tmp)? "SET\n" : "CLEAR\n"));
break;
default: