xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_185.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_185.c,v 1.6 2022/06/16 16:58:36 rillig Exp $	*/
2 # 3 "msg_185.c"
3 
4 // Test for message: cannot initialize '%s' from '%s' [185]
5 
6 typedef struct any {
7 	const void *value;
8 } any;
9 
10 void use(const void *);
11 
12 void
13 initialization_with_redundant_braces(any arg)
14 {
15 	/* expect+1: error: cannot initialize 'pointer to const void' from 'double' [185] */
16 	any local = { 3.0 };
17 	use(&arg);
18 }
19