1 /* { dg-do compile } */ 2 /* { dg-options "-Wformat -Wformat-signedness" } */ 3 4 __attribute__((format(printf, 3, 4))) 5 void dev_printk(const char *level, void *dev, const char *fmt, ...); 6 7 #define lpfc_vport_param_init(attr) \ 8 void lpfc_##attr##_init(void *vport, unsigned int val) \ 9 { \ 10 dev_printk("3", (void *)0, \ 11 "0423 lpfc_"#attr" attribute cannot be set to %d, "\ 12 "allowed range is [0, 1]\n", val); \ 13 } 14 15 #define LPFC_VPORT_ATTR_R(name, desc) \ 16 unsigned int lpfc_##name;\ 17 lpfc_vport_param_init(name)\ 18 19 LPFC_VPORT_ATTR_R(peer_port_login, 20 "Allow peer ports on the same physical port to login to each " 21 "other."); 22 23 /* { dg-warning "20: format .%d. expects argument of type .int., but argument 4 has type .unsigned int. " "" { target *-*-* } .-12 } */ 24