mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-24 08:00:43 +02:00
Merge pull request #1947 from neobrain/fix_tmpnam_warning
unittests/ThunkLibs: Fix warning about "dangerous" use of tmpnam
This commit is contained in:
commit
12fee91ebb
1 file changed
+4
-1
@@ -47,7 +47,10 @@ std::ostream& operator<<(std::ostream& os, const SourceWithAST& ast) {
|
||||
|
||||
struct Fixture {
|
||||
Fixture() {
|
||||
tmpdir = std::tmpnam(nullptr);
|
||||
tmpdir = std::string { P_tmpdir } + "/thunkgentestXXXXXX";
|
||||
if (!mkdtemp(tmpdir.data())) {
|
||||
std::abort();
|
||||
}
|
||||
std::filesystem::create_directory(tmpdir);
|
||||
output_filenames = {
|
||||
tmpdir + "/function_unpacks",
|
||||
|
||||
Reference in new issue
Block a user