xref: /third_party/ltp/tools/sparse/sparse-src/validation/optim/missing-select.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/optim/
1f08c3bdfSopenharmony_cistatic int foo(int **g)
2f08c3bdfSopenharmony_ci{
3f08c3bdfSopenharmony_ci	int i = 1;
4f08c3bdfSopenharmony_ci	int *a[2];
5f08c3bdfSopenharmony_ci	int **p;
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ci	a[1] = &i;
8f08c3bdfSopenharmony_ci	if (g)
9f08c3bdfSopenharmony_ci		p = g;
10f08c3bdfSopenharmony_ci	else
11f08c3bdfSopenharmony_ci		p = &a[0];
12f08c3bdfSopenharmony_ci	if (!g)
13f08c3bdfSopenharmony_ci		**p = 0;
14f08c3bdfSopenharmony_ci	return i;
15f08c3bdfSopenharmony_ci}
16f08c3bdfSopenharmony_ci
17f08c3bdfSopenharmony_ci/*
18f08c3bdfSopenharmony_ci * check-name: missing-select
19f08c3bdfSopenharmony_ci * check-command: test-linearize -Wno-decl $file
20f08c3bdfSopenharmony_ci *
21f08c3bdfSopenharmony_ci * check-output-ignore
22f08c3bdfSopenharmony_ci * check-output-contains: select\\.
23f08c3bdfSopenharmony_ci */
24

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