Skip to content

Fix Coverity issues for acl_platform_test.cpp #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions test/acl_platform_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <CL/opencl.h>

#include <cinttypes>
#include <stdio.h>
#include <string>
#include <vector>
Expand Down Expand Up @@ -204,7 +205,7 @@ MT_TEST(PlatformInfo, size) {
ACL_LOCKED(debug_mode++);
ACL_LOCKED(acl_print_debug_msg("\n"));
#define SHOWSIZE(X) \
ACL_LOCKED(acl_print_debug_msg(" sizeof(%-30s) = %8d\n", #X, sizeof(X)));
ACL_LOCKED(acl_print_debug_msg(" sizeof(%-30s) = %8zu\n", #X, sizeof(X)));

SHOWSIZE(_cl_platform_id);
SHOWSIZE(_cl_context);
Expand Down Expand Up @@ -388,8 +389,8 @@ TEST(offline_device, offline_hal) {
// We might be testing on a machine that has this board!!!
cl_ulong now;
ACL_LOCKED(now = acl_get_hal()->get_timestamp());
ACL_LOCKED(acl_print_debug_msg("offline hal time is %08x%08x", (now >> 32),
(now & 0xffffffff)));
ACL_LOCKED(acl_print_debug_msg("offline hal time is %08" PRIx64 "%08" PRIx64,
(now >> 32), (now & 0xffffffff)));
}

struct live_info_t {
Expand Down