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>
Disable compiler optimizations for linux dll unit tests, because they
made the tests use original instead of mock syscalls.
Ignore false-positive gcc warnings:
- Ignore restrict for gcc12 and maybe-uninitialized
for gcc >= 13 warnings in Release builds in the whole project
- Ignore array-bounds warnings in specific cases
Related-To: NEO-8116
Signed-off-by: Kindracki, Jakub Tomasz <jakub.tomasz.kindracki@intel.com>