mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 01:04:57 +08:00
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:
committed by
Compute-Runtime-Automation
parent
dcbf147a52
commit
bede264d0d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user