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:
Mark Charlebois 2015-04-08 22:30:58 -07:00
parent 410f86b767
commit 2eaa2f06e7
1 changed files with 2 additions and 2 deletions

View File

@ -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");
}