xref: /third_party/ltp/tools/sparse/sparse-src/validation/incomplete-struct.c (revision f08c3bdf)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_cistruct s;
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_civoid foo(struct s s)
4f08c3bdfSopenharmony_ci{
5f08c3bdfSopenharmony_ci}
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_cistruct s bar(void)
8f08c3bdfSopenharmony_ci{
9f08c3bdfSopenharmony_ci	struct s s;
10f08c3bdfSopenharmony_ci	return s;
11f08c3bdfSopenharmony_ci}
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ci/*
14f08c3bdfSopenharmony_ci * check-name: incomplete struct
15f08c3bdfSopenharmony_ci * check-command: sparse -Wno-decl $file
16f08c3bdfSopenharmony_ci * check-known-to-fail
17f08c3bdfSopenharmony_ci *
18f08c3bdfSopenharmony_ci * check-error-start
19f08c3bdfSopenharmony_ciincomplete-struct.c:3:19: error: parameter 's' has incomplete type
20f08c3bdfSopenharmony_ciincomplete-struct.c:7:10: error: return type is incomplete
21f08c3bdfSopenharmony_ciincomplete-struct.c:9:11: error: 's' has incompelete type
22f08c3bdfSopenharmony_ci * check-error-end
23f08c3bdfSopenharmony_ci */
24

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