mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 06:41:08 +00:00
Try to disable CoverityScan warning in code with explanation
This commit is contained in:
parent
fb53b397ff
commit
00503d86e1
@ -143,8 +143,14 @@ static void gdb_info(pid_t pid)
|
|||||||
FILE *f;
|
FILE *f;
|
||||||
int fd;
|
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");
|
strcpy(respfile, "/tmp/gdb-respfile-XXXXXX");
|
||||||
|
// coverity[secure_temp]
|
||||||
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr)
|
if((fd=mkstemp(respfile)) >= 0 && (f=fdopen(fd, "w")) != nullptr)
|
||||||
{
|
{
|
||||||
fprintf(f, "attach %d\n"
|
fprintf(f, "attach %d\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user