1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 01:39:41 +00:00

An another attempt to suppress Coverity warning about mkstemp

This commit is contained in:
Andrei Kortunov 2021-04-14 08:07:43 +04:00
parent 388573cf60
commit 5f6f2c15b1

View file

@ -150,6 +150,9 @@ static void gdb_info(pid_t pid)
* So CoverityScan warning is valid only for ancient versions of stdlib.
*/
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
#ifdef __COVERITY__
umask(0600);
#endif
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr)
{
fprintf(f, "attach %d\n"