msg_126.c revision 1.7
1/* $NetBSD: msg_126.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ 2# 3 "msg_126.c" 3 4// Test for message: incompatible types '%s' and '%s' in conditional [126] 5 6/* lint1-extra-flags: -X 351 */ 7 8/* ARGSUSED */ 9int 10max(int cond, void *ptr, double dbl) 11{ 12 /* expect+2: error: incompatible types 'pointer to void' and 'double' in conditional [126] */ 13 /* expect+1: warning: function 'max' expects to return value [214] */ 14 return cond ? ptr : dbl; 15} 16