diff --git a/test/gtest-extra-test.cc b/test/gtest-extra-test.cc index 0c5d1056..3a8c42f3 100644 --- a/test/gtest-extra-test.cc +++ b/test/gtest-extra-test.cc @@ -419,9 +419,9 @@ TEST(FileTest, DefaultCtor) { } TEST(FileTest, OpenBufferedFileInCtor) { - FILE *pf = fopen("test-file", "w"); - fprintf(pf, FILE_CONTENT); - fclose(pf); + FILE *fp = std::fopen("test-file", "w"); + std::fputs(FILE_CONTENT, fp); + std::fclose(fp); File f("test-file", File::RDONLY); ASSERT_TRUE(IsOpen(f.descriptor())); }