blob: 82703ad4b243a0dae7aaf669178b770fc55a16e1 (
plain)
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
|
# $NetBSD: msg_000.ln,v 1.4 2022/05/30 23:27:45 rillig Exp $
#
# Test data for message 0 of lint2:
# %s used( %s ), but not defined
#
# Define file number 0.
0 s msg_000.c
# Define the main file of the translation unit.
S msg_000.c
# Have a function that is used but not defined, and a function that is defined
# but not used, generated by this code:
# 1: # 2 "msg_000.c"
# 2: defined_not_used() {
# 3: used_not_defined(12345, 0.0);
# 4: }
#
# The function call in line 3 generates this entry:
# '3' logical line 3 in the main .c source
# 'c' function call
# '0.3' file 0, logical line 3 in the currently included file
# 'p1' argument 1 is a positive constant
# 'i' the return value of the function call is ignored
# '16...' the name of the called function
# 'f2' the function is called with 2 arguments
# 'I' the first argument has type 'int'
# 'D' the first argument has type 'double'
# 'I' the return type of the function is (implicitly) 'int'
3 c 0.3 p1 i 16used_not_defined f2 I D I
#
# The function definition in line 2 generates this entry:
# '2' logical line 2 in the main .c source
# 'd' function definition
# '0.2' file 0, logical line 2 in the currently included file
# 'd' function definition
# 'o' old-style function definition
# '16...' the name of the defined function
# 'f0' it's a function with 0 arguments
# 'I' the return type of the function is (implicitly) 'int'
2 d 0.2 d o 16defined_not_used f0 I
|