mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Minor fixes for compiler warnings
Change-Id: I25aa3a31d65e3055850c4731da77a83e3b7a41ab Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
f0907361ff
commit
2a18177ecb
@@ -19,7 +19,7 @@ components:
|
||||
internal:
|
||||
branch: master
|
||||
dest_dir: internal
|
||||
revision: 321eaa2abedf8d6165cbe9214d05da8de83ffc88
|
||||
revision: fb79d6e30f52a7d640bc808ec41997a1ce1faa34
|
||||
type: git
|
||||
kmdaf:
|
||||
branch: kmdaf
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -59,16 +59,16 @@ bool DrmDirectSubmission<GfxFamily, Dispatcher>::submit(uint64_t gpuAddress, siz
|
||||
uint32_t drmContextId = 0u;
|
||||
for (auto drmIterator = 0u; drmIterator < osContextLinux->getDeviceBitfield().size(); drmIterator++) {
|
||||
if (osContextLinux->getDeviceBitfield().test(drmIterator)) {
|
||||
ret |= bb->exec(static_cast<uint32_t>(size),
|
||||
0,
|
||||
execFlags,
|
||||
false,
|
||||
&this->osContext,
|
||||
drmIterator,
|
||||
drmContextIds[drmContextId],
|
||||
nullptr,
|
||||
0,
|
||||
&execObject);
|
||||
ret |= !!bb->exec(static_cast<uint32_t>(size),
|
||||
0,
|
||||
execFlags,
|
||||
false,
|
||||
&this->osContext,
|
||||
drmIterator,
|
||||
drmContextIds[drmContextId],
|
||||
nullptr,
|
||||
0,
|
||||
&execObject);
|
||||
drmContextId++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ double OSTimeLinux::getHostTimerResolution() const {
|
||||
if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) {
|
||||
return 0;
|
||||
}
|
||||
return ts.tv_nsec + ts.tv_sec * NSEC_PER_SEC;
|
||||
return static_cast<double>(ts.tv_nsec + ts.tv_sec * NSEC_PER_SEC);
|
||||
}
|
||||
|
||||
double OSTimeLinux::getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const {
|
||||
@@ -161,7 +161,7 @@ uint64_t OSTimeLinux::getCpuRawTimestamp() {
|
||||
if (!getCpuTime(×InNsec)) {
|
||||
return 0;
|
||||
}
|
||||
ticksInNsec = getHostTimerResolution();
|
||||
ticksInNsec = static_cast<uint64_t>(getHostTimerResolution());
|
||||
if (ticksInNsec == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user