summaryrefslogtreecommitdiff
path: root/driver_skytraq.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-03-31 11:19:33 -0700
committerGary E. Miller <gem@rellim.com>2016-03-31 11:19:33 -0700
commit2884b2fe60820431ffe26a08b373de10c11dff56 (patch)
tree6767d97537a1e2d2fedf2cc4988d9782f58df81c /driver_skytraq.c
parentbca94a916a8341b5d98915328839661946d8833a (diff)
downloadgpsd-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.c3
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));
}