summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorShuah Khan <skhan@linuxfoundation.org>2024-10-12 00:51:55 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-11-06 02:12:32 +0100
commit8801c35c3672c8492824f5d3c4d3b37f43ed63c3 (patch)
treeb98b69b1b2a9ec08d186d46411b9cf0917639a43 /lib
parentlib/crc16_kunit.c: add KUnit tests for crc16 (diff)
downloadlinux-8801c35c3672c8492824f5d3c4d3b37f43ed63c3.tar.xz
linux-8801c35c3672c8492824f5d3c4d3b37f43ed63c3.zip
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/20241011225155.27607-1-skhan@linuxfoundation.org Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions