//-------------------------------------------------------------------------
-// ffi methods
+// ffi methods - only called from Lua so cppcheck suppressions required
//-------------------------------------------------------------------------
+// cppcheck-suppress unusedFunction
SO_PUBLIC void clear_alias()
{
s_aliased_name.clear();
s_aliased_type.clear();
}
+// cppcheck-suppress unusedFunction
SO_PUBLIC bool set_alias(const char* from, const char* to)
{
if ( !from or !to )
return true;
}
+// cppcheck-suppress unusedFunction
SO_PUBLIC void snort_whitelist_append(const char* s)
{
Shell::allowlist_append(s, false);
}
+// cppcheck-suppress unusedFunction
SO_PUBLIC void snort_whitelist_add_prefix(const char* s)
{
Shell::allowlist_append(s, true);
}
+// cppcheck-suppress unusedFunction
+SO_PUBLIC const char* push_include_path(const char* file)
+{
+ static std::string path;
+ path = "";
+ const char* code = get_config_file(file, path);
+ push_parse_location(code, path.c_str(), file);
+ return path.c_str();
+}
+
+// cppcheck-suppress unusedFunction
+SO_PUBLIC void pop_include_path()
+{
+ pop_parse_location();
+}
+
+//-------------------------------------------------------------------------
+// ffi methods - also called internally so no cppcheck suppressions
+//-------------------------------------------------------------------------
+
SO_PUBLIC bool open_table(const char* s, int idx)
{
const char* orig = s;
return set_value(fqn, v);
}
-SO_PUBLIC const char* push_include_path(const char* file)
-{
- static std::string path;
- path = "";
- const char* code = get_config_file(file, path);
- push_parse_location(code, path.c_str(), file);
- return path.c_str();
-}
-
-SO_PUBLIC void pop_include_path()
-{
- pop_parse_location();
-}
-
//-------------------------------------------------------------------------
// private methods
//-------------------------------------------------------------------------
return get<2>(chunks.back());
}
+// cppcheck-suppress unusedFunction
streambuf* istreambuf_glue::setbuf(char* s, streamsize n)
{
n = max(0, n);
return this;
}
+// cppcheck-suppress unusedFunction
streampos istreambuf_glue::seekoff(streamoff off, ios_base::seekdir way, ios_base::openmode which)
{
if (!(which & ios_base::in))
return pos;
}
+// cppcheck-suppress unusedFunction
streampos istreambuf_glue::seekpos(streampos pos, ios_base::openmode which)
{
if (!(which & ios_base::in))
return -1;
}
+// cppcheck-suppress unusedFunction
streamsize istreambuf_glue::showmanyc()
{
if (chunks.empty())
return size - off;
}
+// cppcheck-suppress unusedFunction
streamsize istreambuf_glue::xsgetn(char* s, streamsize n)
{
assert(n >= 0);
return r;
}
+// cppcheck-suppress unusedFunction
int istreambuf_glue::underflow()
{
if (chunks.empty())
return -1;
}
+// cppcheck-suppress unusedFunction
streamsize ostreambuf_infl::xsputn(const char* s, streamsize n)
{
assert(n >= 0);
return n;
}
+// cppcheck-suppress unusedFunction
int ostreambuf_infl::overflow(int c)
{
if (traits_type::eof() == c)