mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Try to disable CoverityScan warning in code with explanation
This commit is contained in:
parent
fb53b397ff
commit
00503d86e1
1 changed files with 7 additions and 1 deletions
|
@ -143,8 +143,14 @@ static void gdb_info(pid_t pid)
|
|||
FILE *f;
|
||||
int fd;
|
||||
|
||||
/* Create a temp file to put gdb commands into */
|
||||
/*
|
||||
* Create a temp file to put gdb commands into.
|
||||
* Note: POSIX.1-2008 declares that the file should be already created with mode 0600 by default.
|
||||
* Modern systems implement it and and suggest to do not touch masks in multithreaded applications.
|
||||
* So CoverityScan warning is valid only for ancient versions of stdlib.
|
||||
*/
|
||||
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
|
||||
// coverity[secure_temp]
|
||||
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr)
|
||||
{
|
||||
fprintf(f, "attach %d\n"
|
||||
|
|
Loading…
Reference in a new issue