mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
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:
committed by
Compute-Runtime-Automation
parent
dec695f405
commit
1c1b2db9a9
@@ -67,7 +67,9 @@ bool checkDefaultCacheDirSettings(std::string &cacheDir, NEO::EnvironmentVariabl
|
||||
}
|
||||
|
||||
time_t getFileModificationTime(const std::string &path) {
|
||||
struct stat st;
|
||||
struct stat st {
|
||||
0, 0
|
||||
};
|
||||
if (NEO::SysCalls::stat(path, &st) == 0) {
|
||||
return st.st_mtime;
|
||||
}
|
||||
@@ -75,7 +77,9 @@ time_t getFileModificationTime(const std::string &path) {
|
||||
}
|
||||
|
||||
size_t getFileSize(const std::string &path) {
|
||||
struct stat st;
|
||||
struct stat st {
|
||||
0, 0
|
||||
};
|
||||
if (NEO::SysCalls::stat(path, &st) == 0) {
|
||||
return static_cast<size_t>(st.st_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user