home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / iter2.c < prev    next >
Text File  |  1997-09-03  |  600b  |  33 lines

  1. # include "iter2.h"
  2.  
  3. int test (void)
  4. {
  5.   char c;
  6.   int i;
  7.   int *a;
  8.  
  9.   intFor(2,5,x,z) /* 1. unrecognized identifier: x */
  10.     {
  11.       printf("%d\n", z);
  12.     } end_intFor;
  13.  
  14.   intFor(2,c,x,i) /* 2, 3, 5. yield param shadows local, variable i declared but not used, type mismatch c */
  15.     {
  16.       ;
  17.     } ; /* 4. not balanced with end_intFor */
  18.  
  19.   intFor(2,12,x,i+3) /* 6, 7. use i before def, yield param not simple */
  20.     {
  21.       ;
  22.     } end_arrayElements; /* 8. not balanced with end_intFor */
  23.  
  24.   arrayElements(1, 10, a, el)
  25.     {
  26.       printf("%d\n", el);
  27.     } end_arrayElements;
  28.   return 3;
  29. }
  30.  
  31.  
  32.  
  33.