MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / getline

Function getline

test/cfg/std.cpp:4755–4775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4753}
4754
4755void getline()
4756{
4757 // #837
4758 std::ifstream in("test1.txt");
4759
4760 char cBuf[10];
4761 // cppcheck-suppress bufferAccessOutOfBounds
4762 in.getline(cBuf, 100);
4763 // cppcheck-suppress bufferAccessOutOfBounds
4764 in.read(cBuf, 100);
4765 // cppcheck-suppress bufferAccessOutOfBounds
4766 in.readsome(cBuf, 100);
4767 // cppcheck-suppress bufferAccessOutOfBounds
4768 in.get(cBuf, 100);
4769 // cppcheck-suppress bufferAccessOutOfBounds
4770 in.get(cBuf, 100, 'a');
4771 // cppcheck-suppress bufferAccessOutOfBounds
4772 in.getline(cBuf, 100, 'a');
4773
4774 in.close();
4775}
4776
4777// cppcheck-suppress passedByValue
4778void stream_write(std::ofstream& s, std::vector<char> v) {

Callers 15

getDepsFunction · 0.85
write_vcxprojFunction · 0.85
getSummaryFilesFunction · 0.85
loadReturnMethod · 0.85
parseFileMethod · 0.85
readCodeFunction · 0.85
parseClangAstDumpMethod · 0.85
importSlnMethod · 0.85
processFilesTxtMethod · 0.85
executeAddonFunction · 0.85
reportClangErrorsFunction · 0.85

Calls 3

readMethod · 0.45
getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected