fix: add unrecoverable to avoid undefined behavior

Related-To: NEO-9038
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-10-10 14:49:54 +00:00
committed by Compute-Runtime-Automation
parent dcbf147a52
commit bede264d0d
5 changed files with 18 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -7,6 +7,8 @@
#include "shared/source/utilities/directory.h"
#include "shared/source/helpers/debug_helpers.h"
#include <cstdio>
#include <dirent.h>
#include <sys/stat.h>
@@ -42,6 +44,7 @@ std::vector<std::string> getFiles(const std::string &path) {
void createDirectory(const std::string &path) {
const mode_t mode = 0777; // 777 in base 8
mkdir(path.c_str(), mode);
[[maybe_unused]] auto status = mkdir(path.c_str(), mode);
DEBUG_BREAK_IF(status != 0);
}
}; // namespace NEO::Directory