From 321c7710c3f3a17d56e9e5eede9aebadbaf16e3e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 30 Apr 2013 23:04:53 -0400 Subject: Fix static-checker warnings. All regression tests pass. cppchecker now finds variables that could have reduced scope; that's most of these. --- timebase.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'timebase.c') diff --git a/timebase.c b/timebase.c index 38b6e951..28ed42b9 100644 --- a/timebase.c +++ b/timebase.c @@ -135,11 +135,10 @@ void gpsd_set_century(struct gps_device_t *session) * started up in. */ { - unsigned char *cp; char *end; if (strstr((char *)session->packet.outbuffer, "Date:") != NULL) { int year; - cp = session->packet.outbuffer + 5; + unsigned char *cp = session->packet.outbuffer + 5; while (isspace(*cp)) --cp; year = (int)strtol((char *)cp, &end, 10); -- cgit v1.2.1