Home | History | Annotate | Line # | Download | only in lint1
msg_305.c revision 1.3
      1 /*	$NetBSD: msg_305.c,v 1.3 2021/08/16 18:51:58 rillig Exp $	*/
      2 # 3 "msg_305.c"
      3 
      4 /* Test for message: ANSI C forbids conversion of %s to %s, op %s [305] */
      5 
      6 /* lint1-flags: -sw */
      7 
      8 void take_void_pointer(void *);
      9 
     10 typedef void (*function)(void);
     11 
     12 void
     13 caller(void **void_pointer, function *function_pointer)
     14 {
     15 	/* expect+1: warning: ANSI C forbids conversion of function pointer to 'void *', op = [305] */
     16 	*void_pointer = *function_pointer;
     17 
     18 	/* expect+1: warning: ANSI C forbids conversion of 'void *' to function pointer, op = [305] */
     19 	*function_pointer = *void_pointer;
     20 }
     21