mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 19:53:35 +08:00
fix all sign-compare warnings
This commit is contained in:
committed by
Lorenz Meier
parent
cf74166801
commit
9ce83f2208
@@ -411,7 +411,7 @@ TFMINI::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
bool want_start = (_measure_ticks == 0);
|
||||
|
||||
/* convert hz to tick interval via microseconds */
|
||||
unsigned ticks = USEC2TICK(1000000 / arg);
|
||||
int ticks = USEC2TICK(1000000 / arg);
|
||||
|
||||
/* check against maximum rate */
|
||||
if (ticks < USEC2TICK(_conversion_interval)) {
|
||||
@@ -528,7 +528,7 @@ TFMINI::collect()
|
||||
perf_begin(_sample_perf);
|
||||
|
||||
/* clear buffer if last read was too long ago */
|
||||
uint64_t read_elapsed = hrt_elapsed_time(&_last_read);
|
||||
int64_t read_elapsed = hrt_elapsed_time(&_last_read);
|
||||
|
||||
/* the buffer for read chars is buflen minus null termination */
|
||||
char readbuf[sizeof(_linebuf)];
|
||||
|
||||
Reference in New Issue
Block a user