Skip to content

Commit

Permalink
POSIX: Fixes for ARMv7 build
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mcharleb committed Jun 2, 2015
1 parent 325e063 commit 122c52c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/platforms/posix/drivers/airspeedsim/airspeedsim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion src/platforms/posix/px4_layer/drv_hrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 122c52c

Please sign in to comment.