summaryrefslogtreecommitdiff
path: root/gpsrinex.c
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2019-03-20 15:41:41 -0700
committerFred Wright <fw@fwright.net>2019-03-20 16:41:10 -0700
commit9a742334e9867d23dc3660f7ad9e2dded3bf946f (patch)
tree89660eed73a03f01e1117817247de802237bd10b /gpsrinex.c
parent19ee7ead6be107f50bc51ba47386694546e71ebf (diff)
downloadgpsd-9a742334e9867d23dc3660f7ad9e2dded3bf946f.tar.gz
gpsrinex: Fix some compiler warnings.
There were two issues here: 1) The initializer for the obs_cnt array needs two levels of brace, since it's an array of structs. 2) The obs_cnts array was incorrectly typed as having obs_codes enums as its *values*, when they're actually only used for its index. This resulted in a warning about the apparently pointless comparison against 99999. TESTED: Ran "build-all check" on OSX 10.9, 10.13, and 10.5 (PPC), as well as Ubuntu 14.04.
Diffstat (limited to 'gpsrinex.c')
-rw-r--r--gpsrinex.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gpsrinex.c b/gpsrinex.c
index 94a69431..97807d64 100644
--- a/gpsrinex.c
+++ b/gpsrinex.c
@@ -138,9 +138,8 @@ typedef enum {C1C = 0, D1C, L1C, C2C, D2C, L2C, CODEMAX} obs_codes;
static struct obs_cnt_t {
unsigned char gnssid;
unsigned char svid; /* svid of 0 means unused slot */
- obs_codes obs_cnts[CODEMAX+1];
- unsigned int count; /* count of obscode */
-} obs_cnt[MAXCNT] = {0};
+ unsigned int obs_cnts[CODEMAX+1]; /* count of obscode */
+} obs_cnt[MAXCNT] = {{0}};
static FILE * tmp_file; /* file handle for temp file */
static int sample_count = 20; /* number of measurement sets to get */