fix: allowing neo ULT build with optimization enabled 5/n

- fix mismatched-new-delete warnings
- fix initialization warnings
- fix attempt to free a non-heap object warnings

Related-To: NEO-8116

Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
This commit is contained in:
Oskar Hubert Weber
2024-12-18 14:51:08 +00:00
committed by Compute-Runtime-Automation
parent dec695f405
commit 1c1b2db9a9
8 changed files with 39 additions and 21 deletions

View File

@@ -29,7 +29,9 @@ OSTimeLinux::OSTimeLinux(OSInterface &osInterface, std::unique_ptr<DeviceTime> d
}
bool OSTimeLinux::getCpuTime(uint64_t *timestamp) {
struct timespec ts;
struct timespec ts {
0, 0
};
if (getTimeFunc(CLOCK_MONOTONIC_RAW, &ts)) {
return false;
@@ -41,7 +43,9 @@ bool OSTimeLinux::getCpuTime(uint64_t *timestamp) {
}
bool OSTime::getCpuTimeHost(uint64_t *timestamp) {
struct timespec ts;
struct timespec ts {
0, 0
};
auto ret = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
@@ -51,7 +55,9 @@ bool OSTime::getCpuTimeHost(uint64_t *timestamp) {
}
double OSTimeLinux::getHostTimerResolution() const {
struct timespec ts;
struct timespec ts {
0, 0
};
if (resolutionFunc(CLOCK_MONOTONIC_RAW, &ts)) {
return 0;
}