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

Class Filepointer

lib/checkio.cpp:107–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105
106namespace {
107 struct Filepointer {
108 OpenMode mode;
109 nonneg int mode_indent{};
110 enum class Operation : std::uint8_t {NONE, UNIMPORTANT, READ, WRITE, POSITIONING, OPEN, CLOSE, UNKNOWN_OP} lastOperation = Operation::NONE;
111 nonneg int op_indent{};
112 enum class AppendMode : std::uint8_t { UNKNOWN_AM, APPEND, APPEND_EX };
113 AppendMode append_mode = AppendMode::UNKNOWN_AM;
114 std::string filename;
115 explicit Filepointer(OpenMode mode_ = OpenMode::UNKNOWN_OM)
116 : mode(mode_) {}
117 };
118
119 const std::unordered_set<std::string> whitelist = { "clearerr", "feof", "ferror", "fgetpos", "ftell", "setbuf", "setvbuf", "ungetc", "ungetwc" };
120}

Callers 1

checkFileUsageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected