xref: /third_party/ltp/tools/sparse/sparse-src/validation/label-unused.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_cistatic void foo(void)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_cil:
4f08c3bdfSopenharmony_ci	return;
5f08c3bdfSopenharmony_ci}
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_cistatic int bar(void)
8f08c3bdfSopenharmony_ci{
9f08c3bdfSopenharmony_ci	return  ({
10f08c3bdfSopenharmony_cil:
11f08c3bdfSopenharmony_ci		;
12f08c3bdfSopenharmony_ci		0;
13f08c3bdfSopenharmony_ci	});
14f08c3bdfSopenharmony_ci}
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_cistatic void baz(void)
17f08c3bdfSopenharmony_ci{
18f08c3bdfSopenharmony_cil: __attribute__((unused));
19f08c3bdfSopenharmony_ci	return;
20f08c3bdfSopenharmony_ci}
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ci/*
23f08c3bdfSopenharmony_ci * check-name: label-unused
24f08c3bdfSopenharmony_ci *
25f08c3bdfSopenharmony_ci * check-error-start
26f08c3bdfSopenharmony_cilabel-unused.c:3:1: warning: unused label 'l'
27f08c3bdfSopenharmony_cilabel-unused.c:10:1: warning: unused label 'l'
28f08c3bdfSopenharmony_ci * check-error-end
29f08c3bdfSopenharmony_ci */
30

Indexes created Thu Nov 07 10:32:03 CST 2024