mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
CMake: disallow variable-length-array
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
09d160910d
commit
4ee27f11c0
@ -688,7 +688,7 @@ if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") # Added for gtest
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Werror=vla")
|
||||
|
||||
if(USE_SANITIZE_UB)
|
||||
check_cxx_compiler_flag(-fsanitize=undefined COMPILER_SUPPORTS_UNDEFINED_BEHAVIOR_SANITIZER)
|
||||
|
@ -825,9 +825,9 @@ void testSysmanFirmware(ze_device_handle_t &device, std::string imagePath) {
|
||||
std::cout << "firmware version = " << fwProperties.version << std::endl;
|
||||
}
|
||||
if (imagePath.size() != 0 && imgSize > 0) {
|
||||
char img[imgSize];
|
||||
imageFile.read(img, imgSize);
|
||||
VALIDATECALL(zesFirmwareFlash(handle, img, static_cast<uint32_t>(imgSize)));
|
||||
std::vector<char> img(imgSize);
|
||||
imageFile.read(img.data(), imgSize);
|
||||
VALIDATECALL(zesFirmwareFlash(handle, img.data(), static_cast<uint32_t>(imgSize)));
|
||||
|
||||
VALIDATECALL(zesFirmwareGetProperties(handle, &fwProperties));
|
||||
if (verbose) {
|
||||
|
Reference in New Issue
Block a user