Skip to content

Commit 2a18177

Browse files
Minor fixes for compiler warnings
Change-Id: I25aa3a31d65e3055850c4731da77a83e3b7a41ab Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
1 parent f090736 commit 2a18177

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

manifests/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ components:
1919
internal:
2020
branch: master
2121
dest_dir: internal
22-
revision: 321eaa2abedf8d6165cbe9214d05da8de83ffc88
22+
revision: fb79d6e30f52a7d640bc808ec41997a1ce1faa34
2323
type: git
2424
kmdaf:
2525
branch: kmdaf

opencl/test/unit_test/os_interface/linux/drm_mock.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ int DrmMock::ioctl(unsigned long request, void *arg) {
181181
auto queryItemArg = reinterpret_cast<drm_i915_query_item *>(queryArg->items_ptr);
182182

183183
auto realEuCount = rootDeviceEnvironment.getHardwareInfo()->gtSystemInfo.EUCount;
184-
auto dataSize = std::ceil(realEuCount / 8.0);
184+
auto dataSize = static_cast<size_t>(std::ceil(realEuCount / 8.0));
185185

186186
if (queryItemArg->length == 0) {
187187
if (queryItemArg->query_id == DRM_I915_QUERY_TOPOLOGY_INFO) {
188-
queryItemArg->length = sizeof(drm_i915_query_topology_info) + dataSize;
188+
queryItemArg->length = static_cast<int32_t>(sizeof(drm_i915_query_topology_info) + dataSize);
189189
return 0;
190190
}
191191
} else {

opencl/test/unit_test/sharings/va/va_sharing_linux_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenFailsThenFunctionsAreNull)
6363
}
6464

6565
void *GetLibFunc(VADisplay vaDisplay, const char *func) {
66-
return (void *)0xdeadbeef;
66+
return reinterpret_cast<void *>(uintptr_t(0xdeadbeef));
6767
}
6868

6969
TEST(VASharingFunctions, GivenInitFunctionsWhenDLOpenSuccedsThenFunctionsAreNotNull) {

shared/source/direct_submission/linux/drm_direct_submission.inl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ bool DrmDirectSubmission<GfxFamily, Dispatcher>::submit(uint64_t gpuAddress, siz
5959
uint32_t drmContextId = 0u;
6060
for (auto drmIterator = 0u; drmIterator < osContextLinux->getDeviceBitfield().size(); drmIterator++) {
6161
if (osContextLinux->getDeviceBitfield().test(drmIterator)) {
62-
ret |= bb->exec(static_cast<uint32_t>(size),
63-
0,
64-
execFlags,
65-
false,
66-
&this->osContext,
67-
drmIterator,
68-
drmContextIds[drmContextId],
69-
nullptr,
70-
0,
71-
&execObject);
62+
ret |= !!bb->exec(static_cast<uint32_t>(size),
63+
0,
64+
execFlags,
65+
false,
66+
&this->osContext,
67+
drmIterator,
68+
drmContextIds[drmContextId],
69+
nullptr,
70+
0,
71+
&execObject);
7272
drmContextId++;
7373
}
7474
}

shared/source/os_interface/linux/os_time_linux.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ double OSTimeLinux::getHostTimerResolution() const {
136136
if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) {
137137
return 0;
138138
}
139-
return ts.tv_nsec + ts.tv_sec * NSEC_PER_SEC;
139+
return static_cast<double>(ts.tv_nsec + ts.tv_sec * NSEC_PER_SEC);
140140
}
141141

142142
double OSTimeLinux::getDynamicDeviceTimerResolution(HardwareInfo const &hwInfo) const {
@@ -161,7 +161,7 @@ uint64_t OSTimeLinux::getCpuRawTimestamp() {
161161
if (!getCpuTime(&timesInNsec)) {
162162
return 0;
163163
}
164-
ticksInNsec = getHostTimerResolution();
164+
ticksInNsec = static_cast<uint64_t>(getHostTimerResolution());
165165
if (ticksInNsec == 0) {
166166
return 0;
167167
}

0 commit comments

Comments
 (0)