1 /* $NetBSD: msg_240.c,v 1.4 2022/07/01 20:53:13 rillig Exp $ */ 2 # 3 "msg_240.c" 3 4 // Test for message: assignment of different structures (%s != %s) [240] 5 // This message is not used. 6 7 struct s_arg { 8 int member; 9 }; 10 11 struct s_local { 12 int member; 13 }; 14 15 struct s_return { 16 int member; 17 }; 18 19 union u_arg { 20 int member; 21 }; 22 23 /* expect+2: warning: argument 's_arg' unused in function 'return_other_struct' [231] */ 24 struct s_return 25 return_other_struct(struct s_arg s_arg) 26 { 27 /* XXX: No warning? */ 28 return s_arg; 29 } 30 31 /* expect+2: warning: argument 's_arg' unused in function 'assign_other_struct' [231] */ 32 void 33 assign_other_struct(struct s_arg s_arg) 34 { 35 static struct s_local s_local; 36 /* XXX: No warning? */ 37 s_local = s_arg; 38 } 39 40 /* expect+2: warning: argument 'u_arg' unused in function 'return_other_union' [231] */ 41 struct s_return 42 return_other_union(union u_arg u_arg) 43 { 44 /* XXX: No warning? */ 45 return u_arg; 46 } 47