mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-17 12:07:34 +08:00
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>
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user