Skip to content

Commit

Permalink
changed construction of for statements to avoid c99 features (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett authored Aug 20, 2021
1 parent 3f06928 commit 999be93
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/tst_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ int main()
if ((ret = g2_info(cgrib, listsec0, listsec1, &numfields, &numlocal)) != 0)
return G2C_ERROR;

for (int i = 0; i < 3; i++) {
int i;
for (i = 0; i < 3; i++) {
if (listsec0[i] != listsec0_ok[i])
return G2C_ERROR;
}
for (int i = 0; i < 13; i++) {
for (i = 0; i < 13; i++) {
if (listsec1[i] != listsec1_ok[i])
return G2C_ERROR;
}
Expand All @@ -88,7 +89,7 @@ int main()
if (gfld->ndpts != 121) /* 11x11 grid */
return G2C_ERROR;

for (int i = 0; i < gfld->ndpts; i++) {
for (i = 0; i < gfld->ndpts; i++) {
if (gfld->fld[i] != fld_ok[i])
return G2C_ERROR;
}
Expand Down

0 comments on commit 999be93

Please sign in to comment.