summaryrefslogtreecommitdiff
path: root/gpsdecode.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-30 17:10:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-30 17:10:53 -0400
commit28bf37132d86cc59320e21d843960d086cef664c (patch)
treebf085b5f89f1d1061b6a88ecc66c50721b13d86c /gpsdecode.c
parentecb7e1ff3ec73000918c56861c55258c2d4deada (diff)
downloadgpsd-28bf37132d86cc59320e21d843960d086cef664c.tar.gz
Retire splint from our set of static analyzers.
The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r--gpsdecode.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gpsdecode.c b/gpsdecode.c
index b5eda7c4..17114c59 100644
--- a/gpsdecode.c
+++ b/gpsdecode.c
@@ -7,9 +7,7 @@
#include <stdbool.h>
#include <string.h>
#include <stdarg.h>
-#ifndef S_SPLINT_S
#include <unistd.h>
-#endif /* S_SPLINT_S */
#include "gpsd.h"
#include "bits.h"
@@ -40,7 +38,6 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen)
(void)snprintf(buf, buflen, "%u|%u|%09u|", ais->type, ais->repeat,
ais->mmsi);
- /*@ -formatcode @*/
switch (ais->type) {
case 1: /* Position Report */
case 2:
@@ -471,7 +468,6 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen)
str_appendf(buf, buflen, "unknown AIVDM message content.");
break;
}
- /*@ +formatcode @*/
(void)strlcat(buf, "\r\n", buflen);
}
#endif
@@ -529,7 +525,6 @@ static void pseudonmea_report(gps_mask_t changed, struct gps_device_t *device)
}
}
-/*@ -mustfreeonly -compdestroy -compdef -usedef -uniondef -immediatetrans -observertrans -statictrans @*/
static void decode(FILE *fpin, FILE*fpout)
/* sensor data on fpin to dump format on fpout */
{
@@ -669,7 +664,6 @@ static void encode(FILE *fpin, FILE *fpout)
(void)fputs(inbuf, fpout);
}
}
-/*@ +mustfreeonly +compdestroy +compdef +usedef +immediatetrans +observertrans @ +statictrans*/
#endif /* SOCKET_EXPORT_ENABLE */
int main(int argc, char **argv)
@@ -711,7 +705,6 @@ int main(int argc, char **argv)
break;
case 't':
- /*@-nullpass@*/
typelist[ntypes++] = (unsigned int)atoi(strtok(optarg, ","));
for(;;) {
char *next = strtok(NULL, ",");
@@ -719,7 +712,6 @@ int main(int argc, char **argv)
break;
typelist[ntypes++] = (unsigned int)atoi(next);
}
- /*@+nullpass@*/
break;
case 'u':