]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | int main() |
2 | { | |
3 | static void nfunc(void); | |
4 | nfunc(); | |
5 | return 0; | |
6 | } | |
7 | static void nfunc(){} | |
8 | ||
9 | /* | |
10 | From: "Johnson, Nathan E. (AZ76)" <NEJohnson@space.honeywell.com> | |
11 | To: "'lclint-bug'" <lclint-bug@salsa.lcs.mit.edu> | |
12 | Subject: Mishandling of prototypes stated within functions | |
13 | Date: Wed, 26 May 1999 09:00:24 -0700 | |
14 | Importance: low | |
15 | X-Priority: 5 | |
16 | MIME-Version: 1.0 | |
17 | X-Mailer: Internet Mail Service (5.5.2448.0) | |
18 | Content-Type: text/plain | |
19 | ||
20 | Using flags: | |
21 | +singleinclude | |
22 | -warnunixlib | |
23 | +unixlib | |
24 | ||
25 | The following program: | |
26 | ---------------------------- | |
27 | int main() | |
28 | { | |
29 | static void nothing(void); | |
30 | nothing(); | |
31 | return 0; | |
32 | } | |
33 | static void nothing(){} | |
34 | ||
35 | ------------------------------ | |
36 | yields: | |
37 | ------------------------------ | |
38 | LCLint 2.4b --- 18 Apr 98 | |
39 | ||
40 | lbug.c:7:13: File static function nothing declared but not used | |
41 | A function is declared but not used. Use @unused@ in front of function | |
42 | header to suppress message. (-fcnuse will suppress message) | |
43 | lbug.c:7:24: Definition of nothing | |
44 | ||
45 | Finished LCLint checking --- 1 code error found | |
46 | ||
47 | */ |