diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-30 17:10:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-30 17:10:53 -0400 |
commit | 28bf37132d86cc59320e21d843960d086cef664c (patch) | |
tree | bf085b5f89f1d1061b6a88ecc66c50721b13d86c /libgps_shm.c | |
parent | ecb7e1ff3ec73000918c56861c55258c2d4deada (diff) | |
download | gpsd-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 'libgps_shm.c')
-rw-r--r-- | libgps_shm.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libgps_shm.c b/libgps_shm.c index 8eb38041..34de8efa 100644 --- a/libgps_shm.c +++ b/libgps_shm.c @@ -30,23 +30,19 @@ PERMISSIONS #include "gpsd.h" #include "libgps.h" -/*@-matchfields@*/ struct privdata_t { void *shmseg; int tick; }; -/*@+matchfields@*/ -int gps_shm_open(/*@out@*/struct gps_data_t *gpsdata) +int gps_shm_open(struct gps_data_t *gpsdata) /* open a shared-memory connection to the daemon */ { int shmid; - /*@-nullpass@*/ long shmkey = getenv("GPSD_SHM_KEY") ? strtol(getenv("GPSD_SHM_KEY"), NULL, 0) : GPSD_SHM_KEY; - /*@+nullpass@*/ libgps_debug_trace((DEBUG_CALLS, "gps_shm_open()\n")); @@ -101,7 +97,6 @@ bool gps_shm_waiting(const struct gps_data_t *gpsdata, int timeout) int gps_shm_read(struct gps_data_t *gpsdata) /* read an update from the shared-memory segment */ { - /*@ -compdestroy */ if (gpsdata->privdata == NULL) return -1; else @@ -136,7 +131,7 @@ int gps_shm_read(struct gps_data_t *gpsdata) (void)memcpy((void *)gpsdata, (void *)&noclobber, sizeof(struct gps_data_t)); - /*@i1@*/gpsdata->privdata = private_save; + gpsdata->privdata = private_save; PRIVATE(gpsdata)->tick = after; if ((gpsdata->set & REPORT_IS)!=0) { if (gpsdata->fix.mode >= 2) @@ -148,7 +143,6 @@ int gps_shm_read(struct gps_data_t *gpsdata) return (int)sizeof(struct gps_data_t); } } - /*@ +compdestroy */ } void gps_shm_close(struct gps_data_t *gpsdata) |