app: cosmetic

Signed-off-by: Intel
This commit is contained in:
Intel 2012-12-20 00:00:00 +01:00 committed by Thomas Monjalon
parent ce0ce98e9f
commit a5d045b2b4
3 changed files with 8 additions and 7 deletions

View File

@ -132,7 +132,8 @@ test_multi_alarms(void)
rte_delay_ms(3500);
if (cb_count.cnt != 2 || rm_count != 1) {
printf("Error: invalid flags count or alarm removal failure"
" - flags value = %d, expected = %d\n", cb_count.cnt, 2);
" - flags value = %d, expected = %d\n",
(int)cb_count.cnt, 2);
/* remove any callbacks that might remain */
rte_eal_alarm_cancel(test_multi_cb, (void *)-1);
return -1;

View File

@ -349,7 +349,7 @@ test_atomic(void)
rte_atomic32_clear(&synchro);
if (rte_atomic32_read(&count) != NUM_ATOMIC_TYPES) {
printf("Atomic inc and test failed %d\n", count.cnt);
printf("Atomic inc and test failed %d\n", (int)count.cnt);
return -1;
}

View File

@ -48,7 +48,7 @@
* Cycles test
* ===========
*
* - Loop N times and check that the timer alway increments and
* - Loop N times and check that the timer always increments and
* never decrements during this loop.
*
* - Wait one second using rte_usleep() and check that the increment
@ -79,13 +79,13 @@ test_cycles(void)
prev_cycles = rte_get_hpet_cycles();
rte_delay_us(1000000);
cycles = rte_get_hpet_cycles();
if ((uint64_t)(cycles - prev_cycles) > (hz + max_inc)) {
printf("delay_us is not accurate\n");
printf("delay_us is not accurate: too long\n");
return -1;
}
cycles = rte_get_hpet_cycles();
if ((uint64_t)(cycles - prev_cycles) < (hz)) {
printf("delay_us is not accurate\n");
if ((uint64_t)(cycles - prev_cycles) < (hz - max_inc)) {
printf("delay_us is not accurate: too short\n");
return -1;
}