summaryrefslogtreecommitdiff
path: root/rtcm3_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 /rtcm3_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 'rtcm3_json.c')
-rw-r--r--rtcm3_json.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/rtcm3_json.c b/rtcm3_json.c
index 3e91ca20..75f66786 100644
--- a/rtcm3_json.c
+++ b/rtcm3_json.c
@@ -25,7 +25,7 @@ PERMISSIONS
int json_rtcm3_read(const char *buf,
char *path, size_t pathlen, struct rtcm3_t *rtcm3,
- /*@null@*/ const char **endptr)
+ const char **endptr)
{
static char *stringptrs[NITEMS(rtcm3->rtcmtypes.data)];
static char stringstore[sizeof(rtcm3->rtcmtypes.data) * 2];
@@ -41,7 +41,6 @@ int json_rtcm3_read(const char *buf,
int status = 0, satcount = 0;
#define RTCM3FIELD(type, fld) STRUCTOBJECT(struct rtcm3_ ## type ## _t, fld)
- /*@ -fullinitblock @*/
const struct json_attr_t rtcm1001_satellite[] = {
{"ident", t_uinteger, RTCM3FIELD(1001, ident)},
{"ind", t_uinteger, RTCM3FIELD(1001, L1.indicator)},
@@ -85,7 +84,6 @@ int json_rtcm3_read(const char *buf,
};
#undef RTCM3FIELD
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1001 &rtcm3->rtcmtypes.rtcm3_1001.header
const struct json_attr_t json_rtcm1001[] = {
RTCM3_HEADER
@@ -99,9 +97,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1001
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1002 &rtcm3->rtcmtypes.rtcm3_1002.header
const struct json_attr_t json_rtcm1002[] = {
RTCM3_HEADER
@@ -115,9 +111,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1002
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1007 rtcm3->rtcmtypes.rtcm3_1007
const struct json_attr_t json_rtcm1007[] = {
RTCM3_HEADER
@@ -128,9 +122,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1002
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1008 rtcm3->rtcmtypes.rtcm3_1008
const struct json_attr_t json_rtcm1008[] = {
RTCM3_HEADER
@@ -143,9 +135,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1008
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1009 &rtcm3->rtcmtypes.rtcm3_1009.header
const struct json_attr_t json_rtcm1009[] = {
RTCM3_HEADER
@@ -159,9 +149,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1010
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1010 &rtcm3->rtcmtypes.rtcm3_1010.header
const struct json_attr_t json_rtcm1010[] = {
RTCM3_HEADER
@@ -175,9 +163,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1010
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1014 &rtcm3->rtcmtypes.rtcm3_1014
const struct json_attr_t json_rtcm1014[] = {
RTCM3_HEADER
@@ -192,9 +178,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1014
- /*@+type@*/
- /*@-type@*//* STRUCTARRAY confuses splint */
#define R1033 rtcm3->rtcmtypes.rtcm3_1033
const struct json_attr_t json_rtcm1033[] = {
RTCM3_HEADER
@@ -211,9 +195,7 @@ int json_rtcm3_read(const char *buf,
{NULL},
};
#undef R1033
- /*@+type@*/
- /*@-type@*//* complex union array initislizations confuses splint */
const struct json_attr_t json_rtcm3_fallback[] = {
RTCM3_HEADER
{"data", t_array, .addr.array.element_type = t_string,
@@ -224,8 +206,6 @@ int json_rtcm3_read(const char *buf,
.addr.array.maxlen = NITEMS(stringptrs)},
{NULL},
};
- /*@+type@*/
- /*@ +fullinitblock @*/
#undef RTCM3_HEADER
/* *INDENT-ON* */