Minor fixes for compiler warnings

Change-Id: I25aa3a31d65e3055850c4731da77a83e3b7a41ab
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-09-18 13:11:50 +02:00
committed by sys_ocldev
parent f0907361ff
commit 2a18177ecb
5 changed files with 16 additions and 16 deletions

View File

@ -181,11 +181,11 @@ int DrmMock::ioctl(unsigned long request, void *arg) {
auto queryItemArg = reinterpret_cast<drm_i915_query_item *>(queryArg->items_ptr);
auto realEuCount = rootDeviceEnvironment.getHardwareInfo()->gtSystemInfo.EUCount;
auto dataSize = std::ceil(realEuCount / 8.0);
auto dataSize = static_cast<size_t>(std::ceil(realEuCount / 8.0));
if (queryItemArg->length == 0) {
if (queryItemArg->query_id == DRM_I915_QUERY_TOPOLOGY_INFO) {
queryItemArg->length = sizeof(drm_i915_query_topology_info) + dataSize;
queryItemArg->length = static_cast<int32_t>(sizeof(drm_i915_query_topology_info) + dataSize);
return 0;
}
} else {

View File

@ -63,7 +63,7 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenFailsThenFunctionsAreNull)
}
void *GetLibFunc(VADisplay vaDisplay, const char *func) {
return (void *)0xdeadbeef;
return reinterpret_cast<void *>(uintptr_t(0xdeadbeef));
}
TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotNull) {