blob: 6b06d166ea32ff3f3fea812730c4b6db3fe500c8 (
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
43
44
45
46
|
/* $NetBSD: msg_240.c,v 1.4 2022/07/01 20:53:13 rillig Exp $ */
# 3 "msg_240.c"
// Test for message: assignment of different structures (%s != %s) [240]
// This message is not used.
struct s_arg {
int member;
};
struct s_local {
int member;
};
struct s_return {
int member;
};
union u_arg {
int member;
};
/* expect+2: warning: argument 's_arg' unused in function 'return_other_struct' [231] */
struct s_return
return_other_struct(struct s_arg s_arg)
{
/* XXX: No warning? */
return s_arg;
}
/* expect+2: warning: argument 's_arg' unused in function 'assign_other_struct' [231] */
void
assign_other_struct(struct s_arg s_arg)
{
static struct s_local s_local;
/* XXX: No warning? */
s_local = s_arg;
}
/* expect+2: warning: argument 'u_arg' unused in function 'return_other_union' [231] */
struct s_return
return_other_union(union u_arg u_arg)
{
/* XXX: No warning? */
return u_arg;
}
|