diff options
author | Kai Wasserbäch <kai@dev.carbon-project.org> | 2023-10-13 14:04:37 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-10-14 17:12:37 +0000 |
commit | 2320ad1da6d1bcb0bcbb7d3aae1e7fa11cf4d8ce (patch) | |
tree | 85078ca81409b99cb5f655ea3d3ecd429929baa2 /include | |
parent | 10e3de37bf6b9592406d4e1de32a5e22bb626ae4 (diff) | |
download | mesa-2320ad1da6d1bcb0bcbb7d3aae1e7fa11cf4d8ce.tar.gz mesa-2320ad1da6d1bcb0bcbb7d3aae1e7fa11cf4d8ce.tar.bz2 mesa-2320ad1da6d1bcb0bcbb7d3aae1e7fa11cf4d8ce.zip |
fix: clover: warning: ignoring return value of ‘int posix_memalign(…)’ [-Wunused-result]
During builds GCC 13.2 issues the following warning:
src/gallium/frontends/clover/api/memory.cpp:612:21: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
612 | posix_memalign(&ptr, alignment, size);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Fix this by checking the returned value is actually 0 and if not we now
report a nullptr.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25724>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions