summaryrefslogtreecommitdiff
path: root/pseudonmea.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 /pseudonmea.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 'pseudonmea.c')
-rw-r--r--pseudonmea.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/pseudonmea.c b/pseudonmea.c
index 96c80b79..5239069d 100644
--- a/pseudonmea.c
+++ b/pseudonmea.c
@@ -29,9 +29,8 @@ static double degtodm(double angle)
return floor(angle) * 100 + fraction * 60;
}
-/*@ -mustdefine @*/
void gpsd_position_fix_dump(struct gps_device_t *session,
- /*@out@*/ char bufp[], size_t len)
+ char bufp[], size_t len)
{
struct tm tm;
time_t intfixtime;
@@ -72,7 +71,6 @@ void gpsd_position_fix_dump(struct gps_device_t *session,
}
}
-/*@ +mustdefine @*/
static void gpsd_transit_fix_dump(struct gps_device_t *session,
char bufp[], size_t len)
@@ -89,7 +87,6 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
tm.tm_year %= 100;
}
#define ZEROIZE(x) (isnan(x)!=0 ? 0.0 : x)
- /*@ -usedef @*/
(void)snprintf(bufp, len,
"$GPRMC,%02d%02d%02d,%c,%09.4f,%c,%010.4f,%c,%.4f,%.3f,%02d%02d%02d,,",
tm.tm_hour,
@@ -103,7 +100,6 @@ static void gpsd_transit_fix_dump(struct gps_device_t *session,
ZEROIZE(session->gpsdata.fix.speed * MPS_TO_KNOTS),
ZEROIZE(session->gpsdata.fix.track),
tm.tm_mday, tm.tm_mon, tm.tm_year);
- /*@ +usedef @*/
#undef ZEROIZE
nmea_add_checksum(bufp);
}
@@ -295,9 +291,7 @@ static void gpsd_binary_ais_dump(struct gps_device_t *session,
if ((datalen % (6*60)) != 0) {
msg1 += 1;
}
- /*@ +charint */
numc[0] = '0' + (char)(number1 & 0x0f);
- /*@ -charint */
numc[1] = '\0';
number1 += 1;
if (number1 > 9) {
@@ -377,10 +371,9 @@ static void gpsd_binary_ais_dump(struct gps_device_t *session,
}
#endif /* AIVDM_ENABLE */
-/*@-compdef -mustdefine@*/
/* *INDENT-OFF* */
void nmea_tpv_dump(struct gps_device_t *session,
- /*@out@*/ char bufp[], size_t len)
+ char bufp[], size_t len)
{
bufp[0] = '\0';
if ((session->gpsdata.set & TIME_SET) != 0)
@@ -400,7 +393,7 @@ void nmea_tpv_dump(struct gps_device_t *session,
/* *INDENT-ON* */
void nmea_sky_dump(struct gps_device_t *session,
- /*@out@*/ char bufp[], size_t len)
+ char bufp[], size_t len)
{
bufp[0] = '\0';
if ((session->gpsdata.set & SATELLITE_SET) != 0)
@@ -409,7 +402,7 @@ void nmea_sky_dump(struct gps_device_t *session,
}
void nmea_subframe_dump(struct gps_device_t *session,
- /*@out@*/ char bufp[], size_t len)
+ char bufp[], size_t len)
{
bufp[0] = '\0';
if ((session->gpsdata.set & SUBFRAME_SET) != 0)
@@ -419,7 +412,7 @@ void nmea_subframe_dump(struct gps_device_t *session,
#ifdef AIVDM_ENABLE
void nmea_ais_dump(struct gps_device_t *session,
- /*@out@*/ char bufp[], size_t len)
+ char bufp[], size_t len)
{
bufp[0] = '\0';
if ((session->gpsdata.set & AIS_SET) != 0)
@@ -428,6 +421,5 @@ void nmea_ais_dump(struct gps_device_t *session,
}
#endif /* AIVDM_ENABLE */
-/*@+compdef +mustdefine@*/
/* pseudonmea.c ends here */