summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-06-27 05:57:05 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-06-27 05:57:05 -0400
commit0c6a0a8ed8e826057069ed8f3b6456f2c1980076 (patch)
tree818b4ff8223d386ee064314dd1222ce0490f7e0a
parentd590e2186b4cf573cd24cb9f0efaa5cb12c98b03 (diff)
downloadgpsd-0c6a0a8ed8e826057069ed8f3b6456f2c1980076.tar.gz
splint and cppcheck cleanup. All regression tests pass.
-rw-r--r--driver_proto.c2
-rw-r--r--gpsdctl.c2
-rw-r--r--ntpshm.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/driver_proto.c b/driver_proto.c
index f12e2dbc..ab6abe85 100644
--- a/driver_proto.c
+++ b/driver_proto.c
@@ -285,7 +285,7 @@ gps_mask_t _proto__dispatch(struct gps_device_t *session, unsigned char *buf, si
type = GET_MESSAGE_TYPE();
/* we may need to dump the raw packet */
- gpsd_report(LOG_RAW, "raw _proto_ packet type 0x%02x\n", type));
+ gpsd_report(LOG_RAW, "raw _proto_ packet type 0x%02x\n", type);
/*
* The tag field is only 8 bytes; be careful you do not overflow.
diff --git a/gpsdctl.c b/gpsdctl.c
index 1c9a0473..9cc48b09 100644
--- a/gpsdctl.c
+++ b/gpsdctl.c
@@ -14,7 +14,9 @@
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
+#ifndef S_SPLINT_S
#include <sys/socket.h>
+#endif /* S_SPLINT_S */
#include "gpsd.h"
diff --git a/ntpshm.c b/ntpshm.c
index d6283c15..d26704a6 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -555,7 +555,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
} sample;
/* chrony must be started first as chrony insists on creating the socket */
/* open the chrony socket */
- int chronyfd;
+ int chronyfd = -1;
char chrony_path[PATH_MAX];
gpsd_report(LOG_PROG, "PPS Create Thread gpsd_ppsmonitor\n");