xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_303.c (revision 3117ece4fc4a4ca4489ba793710b60b0d26bab6c)
1 /*	$NetBSD: msg_303.c,v 1.5 2023/08/26 10:43:53 rillig Exp $	*/
2 # 3 "msg_303.c"
3 
4 /* Test for message: conversion of %s to %s requires a cast [303] */
5 
6 /* lint1-flags: -sw -X 351 */
7 
8 void take_void_pointer(void *);
9 
10 void *
11 to_void_pointer(void)
12 {
13 	/* expect+1: warning: conversion of function pointer to 'void *' requires a cast [303] */
14 	return to_void_pointer;
15 }
16 
17 void (*to_function_pointer(void *arg))(void)
18 {
19 	/* expect+1: warning: conversion of 'void *' to function pointer requires a cast [303] */
20 	return arg;
21 }
22