Fix MSVC warnings

This commit is contained in:
vitaut
2015-07-08 08:04:32 -07:00
parent 4f7ad14c2b
commit 6cf24c7f92
4 changed files with 14 additions and 26 deletions
-13
View File
@@ -40,19 +40,6 @@
namespace {
#ifdef _MSC_VER
// Fix "secure" warning about using fopen without defining
// _CRT_SECURE_NO_WARNINGS.
FILE *safe_fopen(const char *filename, const char *mode) {
FILE *f = 0;
errno = fopen_s(&f, filename, mode);
return f;
}
#define fopen safe_fopen
#else
using std::fopen;
#endif // _MSC_VER
// Tests that assertion macros evaluate their arguments exactly once.
class SingleEvaluationTest : public ::testing::Test {
protected: