MCPcopy Create free account
hub / github.com/GJDuck/e9patch / warning

Method warning

src/e9tool/e9frontend.cpp:95–108  ·  view source on GitHub ↗

* Print a warning message. */

Source from the content-addressed store, hash-verified

93 * Print a warning message.
94 */
95void e9tool::warning(const char *msg, ...)
96{
97 if (option_no_warnings)
98 return;
99
100 char buf[BUFSIZ];
101 va_list ap;
102 va_start(ap, msg);
103 ssize_t r = vsnprintf(buf, sizeof(buf)-1, msg, ap);
104 va_end(ap);
105 if (r < 0 || r >= (ssize_t)sizeof(buf)-1)
106 return; // Drop
107 warnings.push_back(strDup(buf));
108}
109
110/*
111 * Print a debug message.

Callers

nothing calls this directly

Calls 2

strDupFunction · 0.85
vsnprintfFunction · 0.50

Tested by

no test coverage detected