fix all sign-compare warnings

This commit is contained in:
Daniel Agar
2018-07-01 09:36:55 +00:00
committed by Lorenz Meier
parent cf74166801
commit 9ce83f2208
54 changed files with 106 additions and 129 deletions
@@ -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)];