From 8eb7514a020463ffda56654de516095141ca63d3 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 12 Nov 2013 17:05:27 -0500 Subject: splint cleanup. --- monitor_ubx.c | 8 +++++--- ppsthread.c | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/monitor_ubx.c b/monitor_ubx.c index b6d4443b..378339ef 100644 --- a/monitor_ubx.c +++ b/monitor_ubx.c @@ -251,13 +251,15 @@ static void ubx_update(void) } #ifdef PPS_ENABLE + /*@-compdef@*/ + /*@-type@*/ /* splint is confused about struct timespec */ if (pps_thread_lastpps(&session, &drift) > 0) { - /*@-type@*/ /* splint is confused about struct timespec */ double timedelta = timespec_diff_ns(drift.real, drift.clock) * 1e-9; - /*@+type@*/ (void)mvwprintw(ppswin, 1, 13, "%.9f", timedelta); - wnoutrefresh(ppswin); + (void)wnoutrefresh(ppswin); } + /*@+type@*/ + /*@+compdef@*/ #endif /* PPS_ENABLE */ } diff --git a/ppsthread.c b/ppsthread.c index 31ac30db..eb8f6a5e 100644 --- a/ppsthread.c +++ b/ppsthread.c @@ -495,22 +495,26 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) log1 = "no report hook"; if (session->context->pps_hook != NULL) session->context->pps_hook(session, &drift); - /*@+compdef@*/ /*@ -unrecog (splint has no pthread declarations as yet) @*/ (void)pthread_mutex_lock(&ppslast_mutex); /*@ +unrecog @*/ + /*@-type@*/ /* splint is confused about struct timespec */ session->ppslast = drift; + /*@+type@*/ session->ppscount++; /*@ -unrecog (splint has no pthread declarations as yet) @*/ (void)pthread_mutex_unlock(&ppslast_mutex); /*@ +unrecog @*/ + /*@+compdef@*/ } + /*@-type@*/ /* splint is confused about struct timespec */ gpsd_report(session->context->debug, LOG_INF, "PPS edge %.20s %lu.%09lu offset %.9f\n", log1, (unsigned long)clock_ts.tv_sec, (unsigned long)clock_ts.tv_nsec, offset); + /*@+type@*/ } else { gpsd_report(session->context->debug, LOG_RAW, "PPS edge rejected %.100s", log); -- cgit v1.2.1