summaryrefslogtreecommitdiff
path: root/driver_ais.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 /driver_ais.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 'driver_ais.c')
-rw-r--r--driver_ais.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/driver_ais.c b/driver_ais.c
index efc897de..20b4a6ad 100644
--- a/driver_ais.c
+++ b/driver_ais.c
@@ -29,14 +29,8 @@
static void from_sixbit(unsigned char *bitvec, uint start, int count, char *to)
/* beginning at bitvec bit start, unpack count sixbit characters */
{
- /*@ +type @*/
-#ifdef S_SPLINT_S
- /* the real string causes a splint internal error */
- const char sixchr[] = "abcd";
-#else
const char sixchr[64] =
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
-#endif /* S_SPLINT_S */
int i;
/* six-bit to ASCII */
@@ -55,10 +49,8 @@ static void from_sixbit(unsigned char *bitvec, uint start, int count, char *to)
to[i] = '\0';
else
break;
- /*@ -type @*/
}
-/*@ +charint @*/
bool ais_binary_decode(const struct gpsd_errout_t *errout,
struct ais_t *ais,
const unsigned char *bits, size_t bitlen,
@@ -67,9 +59,6 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout,
{
unsigned int u; int i;
-#ifdef S_SPLINT_S
- assert(type24_queue != NULL);
-#endif /* S_SPLINT_S */
#define UBITS(s, l) ubits((unsigned char *)bits, s, l, false)
#define SBITS(s, l) sbits((signed char *)bits, s, l, false)
#define UCHARS(s, to) from_sixbit((unsigned char *)bits, s, sizeof(to)-1, to)
@@ -439,12 +428,10 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout,
mmsi[u] = UBITS(40 + 32*u, 30);
else
mmsi[u] = 0;
- /*@ -usedef @*/
ais->type7.mmsi1 = mmsi[0];
ais->type7.mmsi2 = mmsi[1];
ais->type7.mmsi3 = mmsi[2];
ais->type7.mmsi4 = mmsi[3];
- /*@ +usedef @*/
break;
}
case 8: /* Binary Broadcast Message */
@@ -1098,6 +1085,5 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout,
/* data is fully decoded */
return true;
}
-/*@ -charint @*/
/* driver_ais.c ends here */