summaryrefslogtreecommitdiffstats
path: root/test/Sema/warn-unused-variables.c
blob: 36615061fe6fd9e68da5171525a3ae2415b25d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -verify %s

struct s0 {
	unsigned int	i;
};

int proto(int a, int b);

void f0(void) {
	int	a __attribute__((unused)),
		b; // expected-warning{{unused}}
	return;
}

void f1(void) {
	int	i;
	(void)sizeof(i);
	return;
}
OpenPOWER on IntegriCloud