xref: /third_party/ltp/tools/sparse/sparse-src/validation/crazy03.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_ciextern char a;
2f08c3bdfSopenharmony_ciextern int b;
3f08c3bdfSopenharmony_ciextern char *c, *d;
4f08c3bdfSopenharmony_ciextern void e(void);
5f08c3bdfSopenharmony_ciextern void f(char *);
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ciint g(int h);
8f08c3bdfSopenharmony_ciint g(int h)
9f08c3bdfSopenharmony_ci{
10f08c3bdfSopenharmony_ci	if (h > 1)
11f08c3bdfSopenharmony_ci		e();
12f08c3bdfSopenharmony_ci	if (h > 1)
13f08c3bdfSopenharmony_ci		return 0;
14f08c3bdfSopenharmony_ci	for (;;) {
15f08c3bdfSopenharmony_ci		if (a) {
16f08c3bdfSopenharmony_ci			while (c) ;
17f08c3bdfSopenharmony_ci			b = 0;
18f08c3bdfSopenharmony_ci		} else {
19f08c3bdfSopenharmony_ci			c = (void*)0;
20f08c3bdfSopenharmony_ci			b = 1;
21f08c3bdfSopenharmony_ci		}
22f08c3bdfSopenharmony_ci		if (b) {
23f08c3bdfSopenharmony_ci			f(c);
24f08c3bdfSopenharmony_ci			continue;
25f08c3bdfSopenharmony_ci		}
26f08c3bdfSopenharmony_ci		d = c;
27f08c3bdfSopenharmony_ci		while (*c++) ;
28f08c3bdfSopenharmony_ci	}
29f08c3bdfSopenharmony_ci}
30f08c3bdfSopenharmony_ci
31f08c3bdfSopenharmony_ci/*
32f08c3bdfSopenharmony_ci * check-name: crazy03.c
33f08c3bdfSopenharmony_ci */
34

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