lint: add test for message 160
This commit is contained in:
parent
63840c068e
commit
232122fb53
@ -1,7 +1,13 @@
|
||||
/* $NetBSD: msg_160.c,v 1.1 2021/01/02 10:22:43 rillig Exp $ */
|
||||
/* $NetBSD: msg_160.c,v 1.2 2021/01/09 15:32:06 rillig Exp $ */
|
||||
# 3 "msg_160.c"
|
||||
|
||||
// Test for message: operator '==' found where '=' was expected [160]
|
||||
|
||||
TODO: "Add example code that triggers the above message."
|
||||
TODO: "Add example code that almost triggers the above message."
|
||||
/* lint1-extra-flags: -h */
|
||||
|
||||
_Bool
|
||||
both_equal_or_unequal(int a, int b, int c, int d)
|
||||
{
|
||||
/* XXX: Why shouldn't this be legitimate? */
|
||||
return (a == b) == (c == d);
|
||||
}
|
||||
|
@ -1 +1,2 @@
|
||||
msg_160.c(6): syntax error ':' [249]
|
||||
msg_160.c(12): warning: operator '==' found where '=' was expected [160]
|
||||
msg_160.c(12): warning: operator '==' found where '=' was expected [160]
|
||||
|
Loading…
Reference in New Issue
Block a user