aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Charlebois <charlebm@gmail.com>2015-04-08 22:30:58 -0700
committerMark Charlebois <charlebm@gmail.com>2015-04-20 11:35:48 -0700
commit2eaa2f06e7717f3b19e808f917c5306a19fa16c7 (patch)
treeef627d720fc84422dcd30f1cb35f22eef6fb7a6e
parent410f86b76745a1f40982f6a9da0f0fcab0d4e8b9 (diff)
downloadpx4-firmware-2eaa2f06e7717f3b19e808f917c5306a19fa16c7.tar.gz
px4-firmware-2eaa2f06e7717f3b19e808f917c5306a19fa16c7.tar.bz2
px4-firmware-2eaa2f06e7717f3b19e808f917c5306a19fa16c7.zip
Linux: fised printf param to work on 32 and 64 bit targets
Use %zd instead of %d or %ld for sizeof(x). Signed-off-by: Mark Charlebois <charlebm@gmail.com>
-rw-r--r--src/platforms/linux/drivers/gyrosim/gyrosim.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platforms/linux/drivers/gyrosim/gyrosim.cpp b/src/platforms/linux/drivers/gyrosim/gyrosim.cpp
index 1091b7e93..378c026f2 100644
--- a/src/platforms/linux/drivers/gyrosim/gyrosim.cpp
+++ b/src/platforms/linux/drivers/gyrosim/gyrosim.cpp
@@ -1850,7 +1850,7 @@ test()
sz = read(fd, &a_report, sizeof(a_report));
if (sz != sizeof(a_report)) {
- warnx("ret: %zd, expected: %ld", sz, sizeof(a_report));
+ warnx("ret: %zd, expected: %zd", sz, sizeof(a_report));
err(1, "immediate acc read failed");
}
@@ -1869,7 +1869,7 @@ test()
sz = read(fd_gyro, &g_report, sizeof(g_report));
if (sz != sizeof(g_report)) {
- warnx("ret: %zd, expected: %ld", sz, sizeof(g_report));
+ warnx("ret: %zd, expected: %zd", sz, sizeof(g_report));
err(1, "immediate gyro read failed");
}