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 / tests2.2a / toralf.c < prev   
C/C++ Source or Header  |  1997-09-03  |  417b  |  36 lines

  1. /** fixed, 8 july 1997 */
  2.  
  3. /* test file for lclint */
  4.  
  5. # include <stdlib.h>
  6.  
  7. static void func1 (char *x)
  8. {
  9.   char *s = x;
  10.   int i1;
  11.   float f;
  12.   
  13.   s += 5;
  14.   s += 'c'; /* bad types */
  15.   i1 += f; /* i1 used before def, f used before def */
  16. }
  17.  
  18. static void func2()
  19. {
  20.   int i1;
  21.   int i2;
  22.   
  23.   i1 = i2; /* i2 used before def */
  24. }
  25.  
  26. int main ()
  27. {
  28.   func1 (NULL); /* null passed */
  29.   func2 ();
  30.   return (EXIT_SUCCESS);
  31. }
  32.  
  33.  
  34.  
  35.  
  36.