diff options
author | Gary E. Miller <gem@rellim.com> | 2016-03-31 11:19:33 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-03-31 11:19:33 -0700 |
commit | 2884b2fe60820431ffe26a08b373de10c11dff56 (patch) | |
tree | 6767d97537a1e2d2fedf2cc4988d9782f58df81c /driver_skytraq.c | |
parent | bca94a916a8341b5d98915328839661946d8833a (diff) | |
download | gpsd-2884b2fe60820431ffe26a08b373de10c11dff56.tar.gz |
Remove 'for (int i' which some C compilers hate.
The error fixed:
error: 'for' loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to compile your code
Diffstat (limited to 'driver_skytraq.c')
-rw-r--r-- | driver_skytraq.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/driver_skytraq.c b/driver_skytraq.c index 58892297..2cff4135 100644 --- a/driver_skytraq.c +++ b/driver_skytraq.c @@ -165,6 +165,7 @@ static gps_mask_t sky_msg_DE(struct gps_device_t *session, static gps_mask_t sky_msg_E0(struct gps_device_t *session, unsigned char *buf, size_t len UNUSED) { + int i; unsigned int prn; /* GPS sat PRN */ unsigned int subf; /* subframe 1-5 */ /* the words are preprocessed, not raw, just the 24bits of data */ @@ -175,7 +176,7 @@ static gps_mask_t sky_msg_E0(struct gps_device_t *session, prn = (unsigned int)getub(buf, 1); subf = (unsigned int)getub(buf, 2); - for ( int i = 0; i < 10; i++ ) { + for ( i = 0; i < 10; i++ ) { words[i] = (uint32_t)getbeu24(buf, 3 + (i * 3)); } |