Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / test / iter.c
blob5dc59cee2d146112b5f9f355765797d8230ce062
1 # include "iter.h"
3 int test (void)
5 char c;
6 int i;
7 int *a;
9 intFor(2,5,x,z) /* 2. Unrecognized identifier: x */
11 printf("%d\n", z);
12 } end_intFor;
14 intFor(2,c,x,i) /* 3. Yield parameter shadows local declaration: i
15 5. Iter intFor expects arg 2 to be int gets char: c */
18 } ; /* 4. Iter intFor not balanced with end_intFor */
20 intFor(2, 12, x, i+3) /* 6, 7. Variable i used before definition
21 Yield parameter is not simple identifier: i + 3 */
24 } end_arrayElements; /* 8. Iter intFor not balanced with end_intFor: end_arrayElements */
26 arrayElements(1, 10, a, el)
28 printf("%d\n", el);
29 } end_arrayElements;
30 return 3;