mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Push -Wno-error=deprecated-declarations from C*_FLAGS down to the target
This commit is contained in:
@@ -372,12 +372,17 @@ GncXmlBackend::write_to_file (bool make_backup)
|
||||
strcpy (tmp_name, m_fullpath.c_str());
|
||||
strcat (tmp_name, ".tmp-XXXXXX");
|
||||
|
||||
/* Clang static analyzer flags this as a security risk, which is
|
||||
/* Clang static analyzer and GNU ld flag mktemp as a security risk, which is
|
||||
* theoretically true, but we can't use mkstemp because we need to
|
||||
* open the file ourselves because of compression. None of the alternatives
|
||||
* is any more secure.
|
||||
*
|
||||
* Xcode marks mktemp as deprecated
|
||||
*/
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
|
||||
if (!mktemp (tmp_name))
|
||||
#pragma GCC diagnostic pop
|
||||
{
|
||||
g_free (tmp_name);
|
||||
set_error(ERR_BACKEND_MISC);
|
||||
|
||||
Reference in New Issue
Block a user