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 / modtest.c < prev    next >
Text File  |  1997-09-03  |  400b  |  38 lines

  1. int x, y, ai[], bi[];
  2.  
  3. typedef struct _ts { int a; int b; } tst;
  4.  
  5. tst ts;
  6.  
  7. tst *tstp;
  8.  
  9. int g (int a[], int *p)
  10. {
  11.   return 7;
  12. }
  13.  
  14. int f (int i[], int *j)
  15. {
  16.   i[3] = y;
  17.   j[2] = x;
  18.   ai[3] = 5;
  19.   ai[4] = 8;   /* not a modification error ai[x'] */
  20.   i = j;
  21.   x++;
  22.   y++;
  23.   ts.a = i[2];
  24.   ts.b = tstp->a;
  25.   tstp->b = 6;
  26.   g(j, i);
  27.  
  28.   return 3;
  29. }
  30.  
  31. int h(int a[])
  32. {
  33.   y++;
  34.   (void) g(a, &x);
  35.   return y;
  36. }
  37.  
  38.