1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers: si70xx: fixed left shift compiler warning for 16bit platforms

Signed-off-by: malo <malo@25cmsquare.io>
This commit is contained in:
malo 2016-04-02 00:54:04 +02:00
parent ceab9bd9c3
commit 86eb928642

View File

@ -149,9 +149,9 @@ uint64_t si70xx_get_serial(si70xx_t *dev)
i2c_release(dev->i2c_dev);
/* calculate the ID */
uint32_t id_first = (in_first[0] << 24) + (in_first[2] << 16) +
uint32_t id_first = ((uint32_t)in_first[0] << 24) + ((uint32_t)in_first[2] << 16) +
(in_first[4] << 8) + (in_first[6] << 0);
uint32_t id_second = (in_second[0] << 24) + (in_second[2] << 16) +
uint32_t id_second = ((uint32_t)in_second[0] << 24) + ((uint32_t)in_second[2] << 16) +
(in_second[4] << 8) + (in_second[6] << 0);
return (((uint64_t) id_first) << 32) + id_second;