mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:20:13 +01:00
Fix clang-tidy: function 'rewind' has no error detection; 'fseek' should be used instead [bugprone-unsafe-functions,-warnings-as-errors] (#5265)
This commit is contained in:
@@ -122,7 +122,7 @@ auto RunTestFile(const FileTestBase& test_base, bool dump_output,
|
||||
input_stream = tmpfile();
|
||||
fwrite(split->content.c_str(), sizeof(char), split->content.size(),
|
||||
input_stream);
|
||||
rewind(input_stream);
|
||||
CARBON_CHECK(!fseek(input_stream, 0, SEEK_SET));
|
||||
} else if (!fs->addFile(split->filename, /*ModificationTime=*/0,
|
||||
llvm::MemoryBuffer::getMemBuffer(
|
||||
split->content, split->filename,
|
||||
|
||||
Reference in New Issue
Block a user