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 /ntpshmwrite.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 'ntpshmwrite.c')
-rw-r--r-- | ntpshmwrite.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/ntpshmwrite.c b/ntpshmwrite.c index 217f9514..563102be 100644 --- a/ntpshmwrite.c +++ b/ntpshmwrite.c @@ -12,11 +12,9 @@ #include <errno.h> #include <sys/types.h> #include <sys/stat.h> -#ifndef S_SPLINT_S #include <sys/wait.h> #include <sys/socket.h> #include <unistd.h> -#endif /* S_SPLINT_S */ #include "ntpshm.h" #include "compiler.h" @@ -33,13 +31,11 @@ void ntp_write(volatile struct shmTime *shmseg, * GPS emits leap pending for 3 months prior to insertion * NTP expects leap pending for only 1 month prior to insertion * Per http://bugs.ntp.org/1090 */ - /*@-type@*//* splint is confused about struct timespec */ (void)gmtime_r( &(td->real.tv_sec), &tm); if ( 5 != tm.tm_mon && 11 != tm.tm_mon ) { /* Not june, not December, no way */ leap_notify = LEAP_NOWARNING; } - /*@-type@*/ /* we use the shmTime mode 1 protocol * @@ -61,14 +57,12 @@ void ntp_write(volatile struct shmTime *shmseg, /* We need a memory barrier here to prevent write reordering by * the compiler or CPU cache */ memory_barrier(); - /*@-type@*/ /* splint is confused about struct timespec */ shmseg->clockTimeStampSec = (time_t)td->real.tv_sec; shmseg->clockTimeStampUSec = (int)(td->real.tv_nsec/1000); shmseg->clockTimeStampNSec = (unsigned)td->real.tv_nsec; shmseg->receiveTimeStampSec = (time_t)td->clock.tv_sec; shmseg->receiveTimeStampUSec = (int)(td->clock.tv_nsec/1000); shmseg->receiveTimeStampNSec = (unsigned)td->clock.tv_nsec; - /*@+type@*/ shmseg->leap = leap_notify; shmseg->precision = precision; memory_barrier(); |