summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_096.c
blob: 19e5fb204a3f6e661f5cb1d1aecbce3a08069e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*	$NetBSD: msg_096.c,v 1.7 2023/07/07 19:45:22 rillig Exp $	*/
# 3 "msg_096.c"

// Test for message: cannot dereference non-pointer type '%s' [96]

/* lint1-extra-flags: -X 351 */

int
unary_plus(int i)
{
	return +i;
}

int
unary_minus(int i)
{
	return -i;
}

void
unary_asterisk(int i)
{
	i++;

	/* expect+1: error: cannot dereference non-pointer type 'int' [96] */
	return *i;
}