File: nothing.c

package info (click to toggle)
splint 3.1.2.dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 12,908 kB
  • ctags: 15,816
  • sloc: ansic: 150,306; yacc: 3,463; sh: 3,426; makefile: 2,218; lex: 412
file content (47 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
int main()
{
  static void nfunc(void);
  nfunc();
  return 0;
}
static void nfunc(){}

/*
From: "Johnson, Nathan E. (AZ76)" <NEJohnson@space.honeywell.com>
To: "'lclint-bug'" <lclint-bug@salsa.lcs.mit.edu>
Subject: Mishandling of prototypes stated within functions
Date: Wed, 26 May 1999 09:00:24 -0700
Importance: low
X-Priority: 5
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain

Using flags:
+singleinclude
-warnunixlib
+unixlib

The following program:
----------------------------
int main()
    {
    static void nothing(void);
    nothing();
    return 0;
    }
static void nothing(){}

------------------------------
yields:
------------------------------
LCLint 2.4b --- 18 Apr 98

lbug.c:7:13: File static function nothing declared but not used
  A function is declared but not used. Use @unused@ in front of function
  header to suppress message. (-fcnuse will suppress message)
   lbug.c:7:24: Definition of nothing

Finished LCLint checking --- 1 code error found

*/