summaryrefslogtreecommitdiff
path: root/driver_aivdm.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-01 20:42:02 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-01 20:42:02 -0500
commit588010273c686d364e72428d8ea363643051d495 (patch)
tree1e65b37000d5292dd2ccf08294287d080cf6c82b /driver_aivdm.c
parenta13d392e9f5cfa6e9b35cdbe61db80d0ed0ffde8 (diff)
downloadgpsd-588010273c686d364e72428d8ea363643051d495.tar.gz
Minor code cleanup, banishing warnings.
Diffstat (limited to 'driver_aivdm.c')
-rw-r--r--driver_aivdm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/driver_aivdm.c b/driver_aivdm.c
index fb6f6417..51ae0ee0 100644
--- a/driver_aivdm.c
+++ b/driver_aivdm.c
@@ -129,9 +129,8 @@ bool aivdm_decode(const char *buf, size_t buflen,
* which makes sense as they don't come in over radio. This
* is going to break if there's ever an AIVDO type 24, though.
*/
- if (strncmp(field[0], "!AIVDO", 6) != 0)
- gpsd_report(LOG_ERROR, "invalid empty AIS channel. Assuming 'A'\n",
- field[4][0], (field[4][0] != '\0' ? field[4][0]:' '));
+ if (strncmp((const char *)field[0], "!AIVDO", 6) != 0)
+ gpsd_report(LOG_ERROR, "invalid empty AIS channel. Assuming 'A'\n");
ais_context = &ais_contexts[0];
break;
case '1':
@@ -812,7 +811,7 @@ bool aivdm_decode(const char *buf, size_t buflen,
}
ais->type26.addressed = (bool)UBITS(38, 1);
ais->type26.structured = (bool)UBITS(39, 1);
- if (ais_context->bitlen < 40 + 16*ais->type26.structured + 30*ais->type26.addressed + 20) {
+ if ((signed)ais_context->bitlen < 40 + 16*ais->type26.structured + 30*ais->type26.addressed + 20) {
gpsd_report(LOG_WARN, "AIVDM message type 26 too short for mode.\n");
return false;
}