mem_host_flags: check returned pointer for NULL (#1924)

The specification states that `clEnqueueMapImage` and
`clEnqueueMapBuffer` should return NULL on error. Ensure this is
checked.

This testing gap was caught by a compiler warning about `dataPtr` being
written but not read. With this fix, there are no more
Wunused-but-set-variable warnings in this test, so reenable the warning.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2024-05-30 00:11:32 +02:00
committed by GitHub
parent 6807e165d7
commit 1d3ad8d791
3 changed files with 33 additions and 2 deletions

View File

@@ -6,6 +6,4 @@ set(${MODULE_NAME}_SOURCES
mem_host_image.cpp
)
set_gnulike_module_compile_flags("-Wno-unused-but-set-variable")
include(../CMakeCommon.txt)