Fix various Wformat warnings (#2135)

test_copy_1D.cpp: num_mip_levels is a cl_uint, so don't cast and just
print using `%u`.

test_pipe_info.cpp: arg_type_qualifier is a 64-bit wide bitfield, so
print in hexadecimal format using the correct length modifier.

test_device_partition.cpp: it is not clear what the bit width of
`cl_device_partition_property` should be, so cast the operands to align
with the format specifiers.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
This commit is contained in:
Sven van Haastregt
2024-11-26 18:25:38 +01:00
committed by GitHub
parent d3b9520adc
commit e360d2de5b
16 changed files with 58 additions and 32 deletions

View File

@@ -13,6 +13,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <cinttypes>
#include "procs.h"
#include "harness/parseParameters.h"
@@ -73,7 +76,7 @@ int test_pipe_info( cl_device_id deviceID, cl_context context, cl_command_queue
test_error_fail(err, "clGetKernelArgInfo failed");
if (arg_type_qualifier != CL_KERNEL_ARG_TYPE_PIPE)
{
test_fail("ERROR: Incorrect type qualifier: %i\n",
test_fail("ERROR: Incorrect type qualifier: 0x%" PRIx64 "\n",
arg_type_qualifier);
}
}