'warning: left shift count >= width of type [-Wshift-count-overflow]
i got this problem? warning: left shift count >= width of type [-Wshift-count-overflow] *sensor_time = (uint32_t)((msb << 16) | (xlsb << 8) | lsb);
Solution 1:[1]
long may be a 32-bit or 64-bit type depending on your system, 1 is still an int. You need to make 1 a long int using the L suffix as shown below:
try code below
unsigned long x = 1UL << 32;
or
unsigned long long x = 1ULL << 32
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anachaba |
