Coverity: Suppress false-positives

This commit is contained in:
wmayer
2020-07-19 23:28:25 +02:00
parent e83dd3c0ce
commit 410e65ce2f
2 changed files with 2 additions and 0 deletions

View File

@@ -188,6 +188,7 @@ std::string FileInfo::getTempFileName(const char* FileName, const char* Path)
buf += "/fileXXXXXX";
}
/* coverity[secure_temp] mkstemp uses 0600 as the mode and is safe */
int id = mkstemp(const_cast<char*>(buf.c_str()));
if (id > -1) {
FILE* file = fdopen(id, "w");

View File

@@ -783,6 +783,7 @@ Streambuf::int_type Streambuf::uflow()
Streambuf::int_type Streambuf::pbackfail( int_type ch )
{
/* coverity[negative_returns] _cur is an iterator */
if (_cur == _beg || (ch != traits_type::eof() && ch != _cur[-1]))
return traits_type::eof();