diff options
author | Shuah Khan <[email protected]> | 2024-10-11 16:51:55 -0600 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-11-05 17:12:32 -0800 |
commit | 8801c35c3672c8492824f5d3c4d3b37f43ed63c3 (patch) | |
tree | b98b69b1b2a9ec08d186d46411b9cf0917639a43 /scripts/gdb/linux/lists.py | |
parent | 5d042707089f0d0c49473d05250e4f319a71e1df (diff) |
tools: fix -Wunused-result in linux.c
Fix the following -Wunused-result warnings on posix_memalign()
return values and add error handling.
./shared/linux.c:100:25: warning: ignoring return value of `posix_memalign' declared with attribute `warn_unused_result' [-Wunused-result]
100 | posix_memalign(&p, cachep->align, cachep->size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../shared/linux.c: In function `kmem_cache_alloc_bulk':
../shared/linux.c:198:33: warning: ignoring return value of `posix_memalign' declared with attribute `warn_unused_result' [-Wunused-result]
198 | posix_memalign(&p[i], cachep->align,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
199 | cachep->size);
| ~~~~~~~~~~~~~
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Shuah Khan <[email protected]>
Reviewed-by: Lorenzo Stoakes <[email protected]>
Reviewed-by: Liam R. Howlett <[email protected]>
Cc: Sidhartha Kumar <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions