diff options
-rw-r--r-- | driver_zodiac.c | 4 | ||||
-rw-r--r-- | test_packet.c | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/driver_zodiac.c b/driver_zodiac.c index a62a4a99..ec93c13d 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -18,6 +18,7 @@ #endif /* S_SPLINT_S */ #include "gpsd.h" +#include "bits.h" /* Zodiac protocol description uses 1-origin indexing by little-endian word */ #define get16z(buf, n) ( (buf[2*(n)-2]) \ @@ -52,11 +53,10 @@ static int end_write(int fd, void *d, int len) /* write an array of shorts in little-endian format */ { char buf[BUFSIZ]; - char *p = buf; short *data = (short *)d; size_t n = (size_t)(len/2); - for (n - 0; n < (size_t)(len/2); n++) + for (n = 0; n < (size_t)(len/2); n++) putle16(buf, n*2, data[n]); return write(fd, buf, len); } diff --git a/test_packet.c b/test_packet.c index c91e55bf..9830d6cd 100644 --- a/test_packet.c +++ b/test_packet.c @@ -326,7 +326,6 @@ static void runon_test(struct map *mp) static int property_check(void) { - extern const struct gps_type_t nmea; const struct gps_type_t **dp; int status; |