aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-12-12 16:12:02 -0500
committerRob Austein <sra@hactrn.net>2015-12-12 16:12:02 -0500
commit6f479d8615a60e94b3c19e090a4eba8a0256ec32 (patch)
tree7f52d4f15b4975e9fd2f8ba8b7cd4fcb89e17145 /tests
parentabd5caf5ea6e3563d623d3e952c0b9328f52639f (diff)
Silence platform-dependent compiler whining: in general, when printf()
whines about some platform-dependent integer size issue, it's best to use both an explicitly sized format (eg, "%lu") and an explicit cast (eg, "(unsigned long)") when silencing the warning, otherwise it'll just pop up again in different form on the next platform tested.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-bus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-bus.c b/tests/test-bus.c
index 1c60e5d..b4a3e1c 100644
--- a/tests/test-bus.c
+++ b/tests/test-bus.c
@@ -91,7 +91,8 @@ static void _time_check(char *label, const struct timeval t0, const int err)
t.tv_sec -= 1;
}
rounds = (float)TEST_NUM_ROUNDS/((float)t.tv_sec + ((float)t.tv_usec / 1000000));
- printf("%s%lu.%06lu seconds, %u/sec\n", label, t.tv_sec, t.tv_usec, (unsigned)rounds);
+ printf("%s%lu.%06lu seconds, %u/sec\n", label,
+ (unsigned long)t.tv_sec, (unsigned long)t.tv_usec, (unsigned)rounds);
}
#define time_check(_label_, _expr_) \