diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-10-09 09:00:40 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-10-09 09:00:40 -0400 |
commit | a6f20e590e9b485822befc3542caa1f21cdff676 (patch) | |
tree | 0a7a6857dda2943dc5189eff368067f1bd3cf915 /monitor_sirf.c | |
parent | afe4984bb17a7a72764b84d7b959dc0431d0a130 (diff) | |
download | gpsd-a6f20e590e9b485822befc3542caa1f21cdff676.tar.gz |
const and splint cleanup.
Diffstat (limited to 'monitor_sirf.c')
-rw-r--r-- | monitor_sirf.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/monitor_sirf.c b/monitor_sirf.c index dd6d798d..74da43d9 100644 --- a/monitor_sirf.c +++ b/monitor_sirf.c @@ -63,8 +63,12 @@ static char *dgpsvec[] = { static bool sirf_initialize(void) { + /*@-globstate@*/ unsigned int i; + /* splint pacification */ + assert(mid2win!=NULL && mid7win != NULL); + /*@ -onlytrans @*/ mid2win = subwin(devicewin, 6, 80, 1, 0); mid4win = subwin(devicewin, MAXSATS + 3, 30, 7, 0); @@ -208,6 +212,7 @@ static bool sirf_initialize(void) gpsd_time_init(session.context, time(NULL)); return true; + /*@+globstate@*/ } static void decode_ecef(double x, double y, double z, @@ -219,6 +224,9 @@ static void decode_ecef(double x, double y, double z, const double e_2 = (a * a - b * b) / (b * b); double lambda, p, theta, phi, n, h, vnorth, veast, vup, speed, heading; + /* splint pacification */ + assert(mid2win!=NULL); + lambda = atan2(y, x); /*@ -evalorder @*/ p = sqrt(pow(x, 2) + pow(y, 2)); @@ -273,7 +281,9 @@ static void sirf_update(void) uint8_t dgps; char tbuf[JSON_DATE_MAX+1]; - assert(mid27win != NULL); + /* splint pacification */ + assert(mid2win!=NULL && mid27win != NULL); + buf = session.packet.outbuffer + 4; len = session.packet.outbuflen - 8; switch (buf[0]) { |