POSIX: Fixes for ARMv7 build

uint64_t needs to use PRIu64 in printf.
Clang-3.5 found an error is variable types for a compare.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-02 16:55:39 +00:00
parent 325e063f18
commit 122c52c731
2 changed files with 3 additions and 2 deletions
@@ -211,7 +211,7 @@ Airspeed::ioctl(device::file_t *filp, int cmd, unsigned long arg)
bool want_start = (_measure_ticks == 0);
/* convert hz to tick interval via microseconds */
long ticks = USEC2TICK(1000000 / arg);
unsigned long ticks = USEC2TICK(1000000 / arg);
/* check against maximum rate */
if (ticks < USEC2TICK(_conversion_interval))
+2 -1
View File
@@ -42,6 +42,7 @@
#include <semaphore.h>
#include <time.h>
#include <string.h>
#include <inttypes.h>
#include "hrt_work.h"
static struct sq_queue_s callout_queue;
@@ -301,7 +302,7 @@ hrt_call_internal(struct hrt_call *entry, hrt_abstime deadline, hrt_abstime inte
sq_rem(&entry->link, &callout_queue);
if (interval < HRT_INTERVAL_MIN) {
PX4_ERR("hrt_call_internal interval too short: %lu", interval);
PX4_ERR("hrt_call_internal interval too short: %" PRIu64, interval);
}
entry->deadline = deadline;
entry->period = interval;