summaryrefslogtreecommitdiff
path: root/jsongen.py.in
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 /jsongen.py.in
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 'jsongen.py.in')
-rw-r--r--jsongen.py.in6
1 files changed, 0 insertions, 6 deletions
diff --git a/jsongen.py.in b/jsongen.py.in
index 40b42159..8155e43e 100644
--- a/jsongen.py.in
+++ b/jsongen.py.in
@@ -946,10 +946,8 @@ def generate(spec):
# to make a separate parse control initializer for each one. The
# attribute name is the name of the array; substructure and length
# fieldnames must be given in the defaults part.
- pacify_splint = False
for (attr, itype, arrayparts) in spec["fieldmap"]:
if itype == 'array':
- pacify_splint = True
(innerstruct, lengthfield, elements) = arrayparts
report += " const struct json_attr_t %s_%s_subtype[] = {\n" % (initname, attr)
for (subattr, subitype, default) in elements:
@@ -968,8 +966,6 @@ def generate(spec):
"""
# Generate the main structure definition describing this parse.
# It may have object subarrays.
- if pacify_splint:
- report += "/*@-type@*//* STRUCTARRAY confuses splint */\n"
report += " const struct json_attr_t %s[] = {\n" % initname
if "headers" in spec:
for header in spec["headers"]:
@@ -1003,8 +999,6 @@ def generate(spec):
{NULL}
};
"""
- if pacify_splint:
- report += "/*@+type@*/\n"
print report
if __name__ == '__main__':