tests/lint: add test for incompatible pointer types in return

This commit is contained in:
rillig 2021-03-19 08:01:58 +00:00
parent 19ff95ceea
commit 91bffee2de
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,10 @@
/* $NetBSD: msg_184.c,v 1.2 2021/02/21 09:07:58 rillig Exp $ */
/* $NetBSD: msg_184.c,v 1.3 2021/03/19 08:01:58 rillig Exp $ */
# 3 "msg_184.c"
// Test for message: illegal pointer combination [184]
TODO: "Add example code that triggers the above message." /* expect: 249 */
TODO: "Add example code that almost triggers the above message."
int *
example(char *cp)
{
return cp; /* expect: 184 */
}

View File

@ -1 +1 @@
msg_184.c(6): syntax error ':' [249]
msg_184.c(9): warning: illegal pointer combination [184]