mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: Fix compiler errors in ULTs
Fix warnings that appear when optimizations in ULTs are enabled: - `uninitialized` errors - `free-nonheap-object` errors - add ignoring `-Wno-maybe-uninitialized` errors for gcc12 Release builds due to gcc bug - fix `array-bounds` issue in readLongFileName function - fix other `array-bounds` errors Related-To: NEO-8116 Signed-off-by: Kindracki, Jakub Tomasz <jakub.tomasz.kindracki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6e6c085145
commit
d15aff8679
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -72,6 +72,10 @@ inline ConstStringRef readUnpaddedString(const char *paddedString) {
|
||||
}
|
||||
|
||||
inline ConstStringRef readLongFileName(ConstStringRef longFileNamesSection, size_t offset) {
|
||||
if (offset > longFileNamesSection.size()) {
|
||||
offset = longFileNamesSection.size();
|
||||
}
|
||||
|
||||
size_t end = offset;
|
||||
while ((end < longFileNamesSection.size()) && (longFileNamesSection[end] != SpecialFileNames::fileNameTerminator)) {
|
||||
++end;
|
||||
|
||||
Reference in New Issue
Block a user