blob: cacd4094ce6e7fc72ca46138a9c887ec25b78eb9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* $OpenBSD: test-10.c,v 1.2 2005/12/09 03:34:34 cloder Exp $ */
/*
* Placed in the public domain by Chad Loder <cloder@openbsd.org>.
*
* Test lint warning about literal char assignments.
*/
#include <limits.h>
/* ARGSUSED */
int
main(int argc, char *argv[])
{
unsigned char c;
c = '\377'; /* should not warn, because c is a char type */
c = -1; /* should warn, because rvalue is not a char literal */
c++;
return 0;
}
|