Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nam20485 committed May 6, 2024
1 parent f829b78 commit 5bdff40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OdbDesignLib/FileModel/Design/FileArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace Odb::Lib::FileModel::Design
// move archive to directory

char szTmpNameBuff[L_tmpnam] = { 0 };
std::tmpnam(szTmpNameBuff);
if (nullptr == std::tmpnam(szTmpNameBuff)) return false;

Check warning on line 119 in OdbDesignLib/FileModel/Design/FileArchive.cpp

View workflow job for this annotation

GitHub Actions / CMake-Multi-Platform-Build (windows-2022, x64-release)

'tmpnam': This function or variable may be unsafe. Consider using tmpnam_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Check warning on line 119 in OdbDesignLib/FileModel/Design/FileArchive.cpp

View workflow job for this annotation

GitHub Actions / CMake-Multi-Platform-Build (macos-12, macos-release)

'tmpnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]

auto tempPath = temp_directory_path() / szTmpNameBuff;
if (!create_directory(tempPath)) return false;
Expand Down

0 comments on commit 5bdff40

Please sign in to comment.