Fix compiler warnings.

This commit is contained in:
Sean Wilson 2018-01-16 11:15:12 -05:00
parent 0456bbb0ce
commit 4d97109408

View File

@ -323,7 +323,7 @@ bool minmea_scan(const char *sentence, const char *format, ...)
default: { // Unknown. default: { // Unknown.
goto parse_error; goto parse_error;
} break; }
} }
next_field(); next_field();
@ -581,7 +581,7 @@ bool minmea_parse_vtg(struct minmea_sentence_vtg *frame, const char *sentence)
c_knots != 'N' || c_knots != 'N' ||
c_kph != 'K') c_kph != 'K')
return false; return false;
frame->faa_mode = c_faa_mode; frame->faa_mode = (enum minmea_faa_mode)c_faa_mode;
return true; return true;
} }
@ -633,7 +633,7 @@ int minmea_gettime(struct timespec *ts, const struct minmea_date *date, const st
tm.tm_sec = time_->seconds; tm.tm_sec = time_->seconds;
time_t timestamp = timegm(&tm); /* See README.md if your system lacks timegm(). */ time_t timestamp = timegm(&tm); /* See README.md if your system lacks timegm(). */
if (timestamp != -1) { if (timestamp != (time_t)-1) {
ts->tv_sec = timestamp; ts->tv_sec = timestamp;
ts->tv_nsec = time_->microseconds * 1000; ts->tv_nsec = time_->microseconds * 1000;
return 0; return 0;