summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-28 19:02:23 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-03-28 19:02:23 -0400
commit009ba6e3452df29cbf1757bc0c79dc14683a98da (patch)
tree4775cfa65e817c69a6f29a0ac87daab8701c7ae2 /gpsmon.c
parent5f710d3469c8da31014000ac13664fe92c57757d (diff)
downloadgpsd-009ba6e3452df29cbf1757bc0c79dc14683a98da.tar.gz
Clean up most spint errors. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gpsmon.c b/gpsmon.c
index caa79397..59405d53 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -220,6 +220,7 @@ static void cond_hexdump(/*@out@*/char *buf2, size_t len2,
/*@-type -noeffect@*/ /* splint is confused about struct timespec */
void toff_update(WINDOW *win, int y, int x)
{
+ assert(win != NULL);
if (time_offset.real.tv_sec != 0)
{
/* NOTE: can not use double here due to precision requirements */
@@ -258,6 +259,7 @@ void pps_update(WINDOW *win, int y, int x)
/*@-type -noeffect@*/ /* splint is confused about struct timespec */
struct timedelta_t ppstimes;
+ assert(win != NULL);
if (pps_thread_ppsout(&session.pps_thread, &ppstimes) > 0) {
/* NOTE: can not use double here due to precision requirements */
struct timespec timedelta;
@@ -601,7 +603,7 @@ static void select_packet_monitor(struct gps_device_t *device)
}
/*@+globstate@*/
-/*@-statictrans -globstate@*/
+/*@-statictrans -globstate -unrecog@*/
static /*@null@*/ char *curses_get_command(void)
/* char-by-char nonblocking input, return accumulated command line on \n */
{
@@ -655,7 +657,7 @@ static /*@null@*/ char *curses_get_command(void)
return line;
}
-/*@+statictrans +globstate@*/
+/*@+statictrans +globstate +unrecog@*/
/******************************************************************************
*
@@ -1377,7 +1379,7 @@ int main(int argc, char **argv)
(void)tcgetattr(0, &cooked);
(void)tcgetattr(0, &rare);
rare.c_lflag &=~ (ICANON | ECHO);
- rare.c_cc[VMIN] = (cc_t)1;
+ /*@i2@*/rare.c_cc[VMIN] = (cc_t)1;
(void)tcflush(0, TCIFLUSH);
(void)tcsetattr(0, TCSANOW, &rare);
} else if (!curses_init())