diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-04-25 16:41:02 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-04-25 16:41:02 -0400 |
commit | 14150257b3a0a640727db6f951ba98740dbce611 (patch) | |
tree | 5f273f6343f664a2942ff3c5f149312e9c852728 /gpsdecode.c | |
parent | cee7beef1583b8bbd9b7b6bbcd3b8e604fad224c (diff) | |
download | gpsd-14150257b3a0a640727db6f951ba98740dbce611.tar.gz |
Splint cleanup.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r-- | gpsdecode.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gpsdecode.c b/gpsdecode.c index bb66501f..d9f75455 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -17,8 +17,8 @@ static int verbose = 0; static bool scaled = true; static bool json = true; -static int ntypes = 0; -static int typelist[32]; +static unsigned int ntypes = 0; +static unsigned int typelist[32]; /************************************************************************** * @@ -366,7 +366,7 @@ static bool filter(gps_mask_t changed, struct gps_device_t *session) if (ntypes == 0) return true; else { - int i, t; + unsigned int i, t; if ((changed & AIS_SET)!=0) t = session->gpsdata.ais.type; @@ -487,13 +487,15 @@ int main(int argc, char **argv) break; case 't': - typelist[ntypes++] = atoi(strtok(optarg, ",")); + /*@-nullpass@*/ + typelist[ntypes++] = (unsigned int)atoi(strtok(optarg, ",")); for(;;) { char *next = strtok(NULL, ","); if (next == NULL) break; - typelist[ntypes++] = atoi(next); + typelist[ntypes++] = (unsigned int)atoi(next); } + /*@+nullpass@*/ break; case 'u': |