home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Bug_Fixes / Net.v7bugs / 0048 < prev    next >
Encoding:
Text File  |  1981-12-06  |  671 b   |  25 lines

  1. Autzoo.1190
  2. net.v7bugs
  3. utzoo!henry
  4. Sun Dec  6 05:49:07 1981
  5. lint vs static
  6. With two C files like this:
  7.  
  8. file1.c:
  9.     static int stringscan()
  10.     { return 1; }
  11.  
  12. file2.c:
  13.     static char strings[2000];
  14.  
  15. lint -hpc reports:
  16.     "file1.c", line 2: static variable stringsc$ unused
  17.     ...
  18.     string multiply declared    "file1.c"(2)  ::  "file2.c"(1)
  19.  
  20. Both complaints are wrong.  In the first, lint is mixing up variables
  21. and functions (there is a later complaint about the unused function,
  22. which I left out because it's legitimate).  In the second, lint is
  23. complaining about name conflicts between names that are supposed
  24. to be strictly local to their respective files and hence nonconflicting.
  25.