1/* $NetBSD: msg_156.c,v 1.8 2023/03/28 14:44:35 rillig Exp $ */ 2# 3 "msg_156.c" 3 4// Test for message: function expects '%s', passing '%s' for arg #%d [156] 5 6/* lint1-extra-flags: -X 351 */ 7 8enum color { 9 RED = 1 << 0, 10 GREEN = 1 << 1, 11 BLUE = 1 << 2 12}; 13 14enum size { 15 SMALL, 16 MEDIUM, 17 LARGE 18}; 19 20void print_color(enum color); 21 22void 23example(enum color c, enum size s) 24{ 25 print_color(GREEN); 26 print_color(c); 27 28 /* expect+1: warning: function expects 'enum color', passing 'enum size' for arg #1 [156] */ 29 print_color(MEDIUM); 30 /* expect+1: warning: function expects 'enum color', passing 'enum size' for arg #1 [156] */ 31 print_color(s); 32} 33