Commit caa8d2b2 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Fix unused function warnings when sidebar is disabled. (closes #3936)

parse_path_list/unlist are currently only used by the
un/sidebar_whitelist commands.  Add an ifdef around them to stop an
unused function warning.  Add a comment too, so it's clear why they
are ifdef'ed.
parent bea92f70
......@@ -941,6 +941,12 @@ static int parse_unlist (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err
return 0;
}
/* These two functions aren't sidebar-specific, but they are currently only
* used by the sidebar_whitelist/unsidebar_whitelist commands.
* Putting in an #ifdef to silence an unused function warning when the sidebar
* is disabled.
*/
#ifdef USE_SIDEBAR
static int parse_path_list (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
char path[_POSIX_PATH_MAX];
......@@ -980,6 +986,7 @@ static int parse_path_unlist (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER
return 0;
}
#endif /* USE_SIDEBAR */
static int parse_lists (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
......
......@@ -3880,8 +3880,10 @@ const struct mapping_t SortSidebarMethods[] = {
static int parse_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_spam_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
#ifdef USE_SIDEBAR
static int parse_path_list (BUFFER *, BUFFER *, unsigned long, BUFFER *);
static int parse_path_unlist (BUFFER *, BUFFER *, unsigned long, BUFFER *);
#endif /* USE_SIDEBAR */
static int parse_group (BUFFER *, BUFFER *, unsigned long, BUFFER *);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment