summaryrefslogtreecommitdiff
path: root/rtcm2_json.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 /rtcm2_json.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 'rtcm2_json.c')
-rw-r--r--rtcm2_json.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/rtcm2_json.c b/rtcm2_json.c
index 4d310d8d..d094e94b 100644
--- a/rtcm2_json.c
+++ b/rtcm2_json.c
@@ -27,7 +27,7 @@ PERMISSIONS
int json_rtcm2_read(const char *buf,
char *path, size_t pathlen, struct rtcm2_t *rtcm2,
- /*@null@*/ const char **endptr)
+ const char **endptr)
{
static char *stringptrs[NITEMS(rtcm2->words)];
@@ -49,7 +49,6 @@ int json_rtcm2_read(const char *buf,
int status = 0, satcount = 0;
- /*@ -fullinitblock @*/
const struct json_attr_t rtcm1_satellite[] = {
{"ident", t_uinteger, STRUCTOBJECT(struct gps_rangesat_t, ident)},
{"udre", t_uinteger, STRUCTOBJECT(struct gps_rangesat_t, udre)},
@@ -58,14 +57,12 @@ int json_rtcm2_read(const char *buf,
{"rrc", t_real, STRUCTOBJECT(struct gps_rangesat_t, rrc)},
{NULL},
};
- /*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm1[] = {
RTCM2_HEADER
{"satellites", t_array, STRUCTARRAY(rtcm2->gps_ranges.sat,
rtcm1_satellite, &satcount)},
{NULL},
};
- /*@+type@*/
const struct json_attr_t json_rtcm3[] = {
RTCM2_HEADER
@@ -115,14 +112,12 @@ int json_rtcm2_read(const char *buf,
{"tou", t_uinteger, STRUCTOBJECT(struct consat_t, tou)},
{NULL},
};
- /*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm5[] = {
RTCM2_HEADER
{"satellites", t_array, STRUCTARRAY(rtcm2->conhealth.sat,
rtcm5_satellite, &satcount)},
{NULL},
};
- /*@+type@*/
const struct json_attr_t json_rtcm6[] = {
RTCM2_HEADER
@@ -140,14 +135,12 @@ int json_rtcm2_read(const char *buf,
{"bitrate", t_uinteger, STRUCTOBJECT(struct station_t, bitrate)},
{NULL},
};
- /*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm7[] = {
RTCM2_HEADER
{"satellites", t_array, STRUCTARRAY(rtcm2->almanac.station,
rtcm7_satellite, &satcount)},
{NULL},
};
- /*@+type@*/
const struct json_attr_t json_rtcm13[] = {
RTCM2_HEADER
@@ -185,16 +178,13 @@ int json_rtcm2_read(const char *buf,
{"rrc", t_real, STRUCTOBJECT(struct glonass_rangesat_t, rrc)},
{NULL},
};
- /*@-type@*//* STRUCTARRAY confuses splint */
const struct json_attr_t json_rtcm31[] = {
RTCM2_HEADER
{"satellites", t_array, STRUCTARRAY(rtcm2->glonass_ranges.sat,
rtcm31_satellite, &satcount)},
{NULL},
};
- /*@+type@*/
- /*@-type@*//* complex union array initislizations confuses splint */
const struct json_attr_t json_rtcm2_fallback[] = {
RTCM2_HEADER
{"data", t_array, .addr.array.element_type = t_string,
@@ -205,8 +195,6 @@ int json_rtcm2_read(const char *buf,
.addr.array.maxlen = NITEMS(stringptrs)},
{NULL},
};
- /*@+type@*/
- /*@ +fullinitblock @*/
#undef RTCM2_HEADER
/* *INDENT-ON* */