xref: /third_party/ltp/tools/sparse/sparse-src/validation/Waddress-function.c (revision f08c3bdf)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/tools/sparse/sparse-src/validation/
1f08c3bdfSopenharmony_ciextern void func(void);
2f08c3bdfSopenharmony_ci
3f08c3bdfSopenharmony_ciint global_function(void)
4f08c3bdfSopenharmony_ci{
5f08c3bdfSopenharmony_ci	if (func)
6f08c3bdfSopenharmony_ci		return 1;
7f08c3bdfSopenharmony_ci	return 0;
8f08c3bdfSopenharmony_ci}
9f08c3bdfSopenharmony_ci
10f08c3bdfSopenharmony_ci/*
11f08c3bdfSopenharmony_ci * check-name: Waddress-function
12f08c3bdfSopenharmony_ci * check-command: sparse -Wno-decl -Waddress $file
13f08c3bdfSopenharmony_ci *
14f08c3bdfSopenharmony_ci * check-error-start
15f08c3bdfSopenharmony_ciWaddress-function.c:5:13: warning: the address of a function will always evaluate as true
16f08c3bdfSopenharmony_ci * check-error-end
17f08c3bdfSopenharmony_ci */
18

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