diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-06 14:13:06 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-06 14:13:06 -0500 |
commit | 6a70ad85340b25b5e3a224d61e4cee7277333969 (patch) | |
tree | fa7ec24ea268fb1fd5d6f611b8931320681bb87b /driver_nmea2000.c | |
parent | a7280f885cdc98b06c505a8ea4e4db9bd712ca36 (diff) | |
download | gpsd-6a70ad85340b25b5e3a224d61e4cee7277333969.tar.gz |
cppcheck and Coverity cleanup (not yet complete).
All regression tests pass. PPS is live.
Diffstat (limited to 'driver_nmea2000.c')
-rw-r--r-- | driver_nmea2000.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c index 1fc36345..a0a1db38 100644 --- a/driver_nmea2000.c +++ b/driver_nmea2000.c @@ -1288,8 +1288,10 @@ static void find_pgn(struct can_frame *frame, struct gps_device_t *session) /*@ignore@*//* because the CAN include files choke splint */ if (frame->can_id & 0x80000000) { // cppcheck-suppress unreadVariable - unsigned int source_prio UNUSED; - unsigned int daddr UNUSED; +#ifdef __UNUSED__ + unsigned int source_prio; + unsigned int daddr; +#endif // cppcheck-suppress unreadVariable unsigned int source_pgn; unsigned int source_unit; @@ -1523,7 +1525,7 @@ static gps_mask_t nmea2000_parse_input(struct gps_device_t *session) int nmea2000_open(struct gps_device_t *session) { - char interface_name[strlen(session->gpsdata.dev.path)]; + char interface_name[strlen(session->gpsdata.dev.path)+1]; socket_t sock; int status; int unit_number; |