xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_279.c (revision b2baa50111d645353fa30b4deab0f79d93650c8c)
1 /*	$NetBSD: msg_279.c,v 1.5 2023/03/28 14:44:35 rillig Exp $	*/
2 # 3 "msg_279.c"
3 
4 // Test for message: combination of '%s' and '%s' in return [279]
5 
6 /* lint1-extra-flags: -e -X 351 */
7 
8 enum E {
9 	E1
10 };
11 
12 void sink_enum(enum E);
13 void sink_int(int);
14 
15 enum E
returning_enum(int i)16 returning_enum(int i)
17 {
18 	/* expect+1: warning: combination of 'enum E' and 'int' in return [279] */
19 	return i;
20 }
21 
22 int
returning_int(enum E e)23 returning_int(enum E e)
24 {
25 	/* expect+1: warning: combination of 'int' and 'enum E' in return [279] */
26 	return e;
27 }
28