From dab1629290cc471813952ac03f5b031b7efb2533 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 10 Sep 2009 18:50:49 +0000 Subject: Guard some inclusions that splint doesn't like. No effect on compilation. All regression tests pass. --- driver_aivdm.c | 2 ++ driver_evermore.c | 2 ++ driver_garmin.c | 2 ++ driver_garmin_txt.c | 2 ++ driver_italk.c | 2 ++ driver_navcom.c | 2 ++ driver_nmea.c | 2 ++ driver_oncore.c | 2 ++ driver_proto.c | 2 ++ driver_rtcm2.c | 2 ++ driver_rtcm3.c | 2 ++ driver_sirf.c | 2 ++ driver_superstar2.c | 2 ++ driver_tsip.c | 2 ++ driver_ubx.c | 2 ++ driver_zodiac.c | 2 ++ drivers.c | 2 ++ gpsd.c | 4 ++++ gpsdclient.c | 2 ++ gpsutils.c | 2 ++ hex.c | 2 ++ isgps.c | 2 ++ lcdgps.c | 4 ++++ libgps.c | 2 ++ libgpsd_core.c | 2 +- net_dgpsip.c | 2 +- net_gnss_dispatch.c | 2 +- net_ntrip.c | 2 +- netlib.c | 2 ++ packet.c | 2 ++ serial.c | 2 ++ strl.c | 2 ++ 32 files changed, 64 insertions(+), 4 deletions(-) diff --git a/driver_aivdm.c b/driver_aivdm.c index 8f90eaf4..d45d3f08 100644 --- a/driver_aivdm.c +++ b/driver_aivdm.c @@ -15,7 +15,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_evermore.c b/driver_evermore.c index 24f9996d..f24495e1 100644 --- a/driver_evermore.c +++ b/driver_evermore.c @@ -118,7 +118,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_garmin.c b/driver_garmin.c index e6074970..40b7cc9b 100644 --- a/driver_garmin.c +++ b/driver_garmin.c @@ -84,7 +84,9 @@ #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_garmin_txt.c b/driver_garmin_txt.c index 2b607d2e..03b54f4e 100644 --- a/driver_garmin_txt.c +++ b/driver_garmin_txt.c @@ -111,7 +111,9 @@ invalid data. #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_italk.c b/driver_italk.c index 224c4089..9e692ab9 100644 --- a/driver_italk.c +++ b/driver_italk.c @@ -8,7 +8,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_navcom.c b/driver_navcom.c index e819e67d..0ae7dac7 100644 --- a/driver_navcom.c +++ b/driver_navcom.c @@ -37,7 +37,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/driver_nmea.c b/driver_nmea.c index 51bc1c69..6777c04c 100644 --- a/driver_nmea.c +++ b/driver_nmea.c @@ -1,7 +1,9 @@ /* $Id$ */ #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/driver_oncore.c b/driver_oncore.c index c68b68ef..fec40671 100644 --- a/driver_oncore.c +++ b/driver_oncore.c @@ -6,7 +6,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_proto.c b/driver_proto.c index b43b94a3..9f3517dc 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -41,7 +41,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_rtcm2.c b/driver_rtcm2.c index 70f3669c..4ea6da90 100644 --- a/driver_rtcm2.c +++ b/driver_rtcm2.c @@ -51,7 +51,9 @@ Starlink's website. *****************************************************************************/ #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/driver_rtcm3.c b/driver_rtcm3.c index 58049887..a6f4c5ee 100644 --- a/driver_rtcm3.c +++ b/driver_rtcm3.c @@ -26,7 +26,9 @@ firmware. *****************************************************************************/ #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/driver_sirf.c b/driver_sirf.c index b9322c80..ddf4c463 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -31,7 +31,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_superstar2.c b/driver_superstar2.c index 850c5a29..b78f8600 100644 --- a/driver_superstar2.c +++ b/driver_superstar2.c @@ -5,7 +5,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include diff --git a/driver_tsip.c b/driver_tsip.c index 5c0d804a..e021921f 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -6,7 +6,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include "gpsd_config.h" #include "gpsd.h" diff --git a/driver_ubx.c b/driver_ubx.c index 907ce896..9ee3f7cb 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -9,7 +9,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/driver_zodiac.c b/driver_zodiac.c index bf93baca..0956038c 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -6,7 +6,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include "gpsd_config.h" #include "gpsd.h" diff --git a/drivers.c b/drivers.c index 911134d7..7ad100b9 100644 --- a/drivers.c +++ b/drivers.c @@ -3,7 +3,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/gpsd.c b/gpsd.c index 1543f32d..662f578b 100644 --- a/gpsd.c +++ b/gpsd.c @@ -6,7 +6,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include @@ -2000,6 +2002,7 @@ int main(int argc, char *argv[]) * It requires that all GPS devices have their group read/write * permissions set. */ + /*@-type@*/ if ((optindpw_uid); + /*@+type@*/ } gpsd_report(LOG_INF, "running with effective group ID %d\n", getegid()); gpsd_report(LOG_INF, "running with effective user ID %d\n", geteuid()); diff --git a/gpsdclient.c b/gpsdclient.c index 7d99ffb2..a2ed8c03 100644 --- a/gpsdclient.c +++ b/gpsdclient.c @@ -2,7 +2,9 @@ /* gpsclient.c -- support functions for GPSD clients */ #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/gpsutils.c b/gpsutils.c index f30a70e7..76716d10 100644 --- a/gpsutils.c +++ b/gpsutils.c @@ -2,7 +2,9 @@ /* gpsutils.c -- code shared between low-level and high-level interfaces */ #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/hex.c b/hex.c index 41afcf17..35a2f4b2 100644 --- a/hex.c +++ b/hex.c @@ -1,5 +1,7 @@ /* $Id$ */ +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/isgps.c b/isgps.c index 1158d7f7..5e87d742 100644 --- a/isgps.c +++ b/isgps.c @@ -57,7 +57,9 @@ You are not expected to understand any of this. *****************************************************************************/ #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/lcdgps.c b/lcdgps.c index 32989441..b0fbf78b 100644 --- a/lcdgps.c +++ b/lcdgps.c @@ -39,11 +39,15 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include /* select() */ #include diff --git a/libgps.c b/libgps.c index 04a42824..cb26b92e 100644 --- a/libgps.c +++ b/libgps.c @@ -2,7 +2,9 @@ /* libgps.c -- client interface library for the gpsd daemon */ #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/libgpsd_core.c b/libgpsd_core.c index 44d42103..98d1cf31 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -4,9 +4,9 @@ #include #ifndef S_SPLINT_S #include +#include #endif /* S_SPLINT_S */ #include -#include #include #include #include diff --git a/net_dgpsip.c b/net_dgpsip.c index 9e5ab3dd..d1591e66 100644 --- a/net_dgpsip.c +++ b/net_dgpsip.c @@ -3,9 +3,9 @@ #include #ifndef S_SPLINT_S #include +#include #endif /* S_SPLINT_S */ #include -#include #include #include #include diff --git a/net_gnss_dispatch.c b/net_gnss_dispatch.c index ca8286fd..78f58618 100644 --- a/net_gnss_dispatch.c +++ b/net_gnss_dispatch.c @@ -4,9 +4,9 @@ #include #ifndef S_SPLINT_S #include +#include #endif /* S_SPLINT_S */ #include -#include #include #include "gpsd_config.h" diff --git a/net_ntrip.c b/net_ntrip.c index 6293a23a..91345dd3 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -3,9 +3,9 @@ #include #ifndef S_SPLINT_S #include +#include #endif /* S_SPLINT_S */ #include -#include #include #include #include diff --git a/netlib.c b/netlib.c index 6705fadf..2382198c 100644 --- a/netlib.c +++ b/netlib.c @@ -21,7 +21,9 @@ #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include "gpsd.h" diff --git a/packet.c b/packet.c index f000e434..830ea5ce 100644 --- a/packet.c +++ b/packet.c @@ -27,7 +27,9 @@ others apart and distinguish them from baud barf. #include #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include /* for htons() */ diff --git a/serial.c b/serial.c index ee6d4907..9d585f47 100644 --- a/serial.c +++ b/serial.c @@ -1,7 +1,9 @@ /* $Id$ */ #include #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include diff --git a/strl.c b/strl.c index 26b25ee9..bb47eea1 100644 --- a/strl.c +++ b/strl.c @@ -1,6 +1,8 @@ /* $Id$ */ #include +#ifndef S_SPLINT_S #include +#endif /* S_SPLINT_S */ #include #include #include "gpsd_config.h" -- cgit v1.2.1