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:
Kindracki, Jakub Tomasz
2025-09-03 13:28:36 +00:00
committed by Compute-Runtime-Automation
parent 6e6c085145
commit d15aff8679
9 changed files with 38 additions and 53 deletions

View File

@@ -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;