You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/08/27 02:05:11 UTC
[nuttx] 01/02: lsm9ds1.c: fix printf warnings
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 8665acaffaaceb0d0b2febe6c298a4586980c557
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Aug 26 15:42:41 2023 +0200
lsm9ds1.c: fix printf warnings
---
drivers/sensors/lsm9ds1.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/sensors/lsm9ds1.c b/drivers/sensors/lsm9ds1.c
index 948f86dad4..cc98061979 100644
--- a/drivers/sensors/lsm9ds1.c
+++ b/drivers/sensors/lsm9ds1.c
@@ -1367,14 +1367,16 @@ static int lsm9ds1_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
case SNIOC_SETSAMPLERATE:
ret = priv->ops->setsamplerate(priv, (uint32_t)arg);
- sninfo("sample rate: %08x ret: %d\n", (uint32_t)arg, ret);
+ sninfo("sample rate: %08" PRId32 " ret: %d\n",
+ (uint32_t)arg, ret);
break;
/* Set the full-scale range. Arg: uint32_t value. */
case SNIOC_SETFULLSCALE:
ret = priv->ops->setfullscale(priv, (uint32_t)arg);
- sninfo("full-scale range: %08x ret: %d\n", (uint32_t)arg, ret);
+ sninfo("full-scale range: %08" PRId32 " ret: %d\n",
+ (uint32_t)arg, ret);
break;
/* Unrecognized commands */
@@ -1550,5 +1552,4 @@ int lsm9ds1mag_register(FAR const char *devpath,
return lsm9ds1_register(devpath, i2c, addr, &g_lsm9ds1mag_ops,
LSM9DS1_OUT_X_L_M);
}
-
#endif /* CONFIG_I2C && CONFIG_SENSORS_LSM9DS1 */