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 / alias4.c < prev    next >
Text File  |  1997-09-03  |  522b  |  35 lines

  1. # include "alias4.lh"
  2.  
  3. mut f(mut a, mut b)
  4. {
  5.   mut c;
  6.  
  7.   if (1 == 3)
  8.     {
  9.       c = a;
  10.     }
  11.   else
  12.     {
  13.       c = b;
  14.     }
  15.   return c;  /* 2 * bad: may reference parameter a, b */
  16. }
  17.  
  18. int g (void)
  19. {
  20.   return glob;
  21. }
  22.  
  23. int *h (void)
  24. {
  25.   if (1 > 3)
  26.     return &glob; /* returns ref to global glob */
  27.   else if (2 > 3)
  28.     return globp; /* return reference to global globp */
  29.   else if (3 > 3)
  30.     return (globs.field); /* returns reference to globs */
  31.   else 
  32.     return (&(globs.val)); /* returns reference to globs */
  33. }
  34.  
  35.