diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-28 19:02:23 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-28 19:02:23 -0400 |
commit | 009ba6e3452df29cbf1757bc0c79dc14683a98da (patch) | |
tree | 4775cfa65e817c69a6f29a0ac87daab8701c7ae2 /gpsmon.c | |
parent | 5f710d3469c8da31014000ac13664fe92c57757d (diff) | |
download | gpsd-009ba6e3452df29cbf1757bc0c79dc14683a98da.tar.gz |
Clean up most spint errors. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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()) |