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 / lintcomments.c < prev    next >
Text File  |  1997-09-03  |  364b  |  29 lines

  1. int f (int x)
  2. {
  3.   int i = 0;
  4.  
  5.   switch (x)
  6.     {
  7.     case 1: i++; /*@fallthrough@*/
  8.     case 2: i++; /*FALLTHROUGH*/
  9.     case 3: i++; /*FALLTHRU*/
  10.     case 4: i++;
  11.     default: i++;
  12.     }
  13.  
  14.   if (i > 2)
  15.     {
  16.       return i;
  17.       /*@notreached@*/
  18.       i++;
  19.     }
  20.   else
  21.     {
  22.       return i;
  23.       /*NOTREACHED*/
  24.       i++;
  25.     }
  26.  
  27.   /*@notreached@*/ return 3; 
  28. }
  29.