drivers: flash: stm32g4x: fix LOG_ERR compiler warning

off_t can be 32-bit or 64-bit depending on the platform. STM32 flash
addresses are always 32-bit so it's safe to use long here.

Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
Martin Jäger 2020-12-18 14:32:06 +01:00 committed by Anas Nashif
commit 6181184163

View file

@ -69,7 +69,7 @@ static int write_dword(const struct device *dev, off_t offset, uint64_t val)
/* Check if this double word is erased */
if (flash[0] != 0xFFFFFFFFUL ||
flash[1] != 0xFFFFFFFFUL) {
LOG_ERR("Word at offs %d not erased", offset);
LOG_ERR("Word at offs %ld not erased", (long)offset);
return -EIO;
}