PVS: V530 The return value of function 'freopen' is required to be utilized

This commit is contained in:
wmayer
2019-03-03 17:14:20 +01:00
parent b797eb6a70
commit 8a95461ae3

View File

@@ -78,10 +78,13 @@ public:
: fi(Base::FileInfo::getTempFileName()), file(f)
{
#ifdef WIN32
_wfreopen(fi.toStdWString().c_str(),L"w",file);
FILE* ptr = _wfreopen(fi.toStdWString().c_str(),L"w",file);
#else
freopen(fi.filePath().c_str(),"w",file);
FILE* ptr = freopen(fi.filePath().c_str(),"w",file);
#endif
if (!ptr) {
std::cerr << "Failed to reopen file" << std::endl;
}
}
~Redirection()
{