aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-10-15 12:23:43 +0100
committerJoão Valverde <j@v6e.pt>2021-10-15 12:23:43 +0100
commite46deda5cf0b70695d8bc5ac5c7365b20302ae7e (patch)
treeef1f2ec7162b6bc091ae19dae73a747a656095e0
parente116110f0cbd21c48982feadf4864218cf020264 (diff)
Fix build with WS_DISABLE_DEBUG
-rw-r--r--epan/dfilter/dfilter.c6
-rw-r--r--epan/dfilter/semcheck.c11
2 files changed, 2 insertions, 15 deletions
diff --git a/epan/dfilter/dfilter.c b/epan/dfilter/dfilter.c
index 2741001905..5cbf570ce2 100644
--- a/epan/dfilter/dfilter.c
+++ b/epan/dfilter/dfilter.c
@@ -374,9 +374,7 @@ dfilter_compile(const gchar *text, dfilter_t **dfp, gchar **err_msg)
yyscan_t scanner;
YY_BUFFER_STATE in_buffer;
gboolean failure = FALSE;
-#ifndef WS_DISABLE_DEBUG
unsigned token_count = 0;
-#endif
ws_assert(dfp);
@@ -427,9 +425,7 @@ dfilter_compile(const gchar *text, dfilter_t **dfp, gchar **err_msg)
break;
}
- ws_log_full(LOG_DOMAIN_DFILTER, LOG_LEVEL_DEBUG,
- NULL, -1, __func__,
- "(%u) Token %d %s %s",
+ ws_debug("(%u) Token %d %s %s",
++token_count, token, tokenstr(token),
stnode_token_value(df_lval));
diff --git a/epan/dfilter/semcheck.c b/epan/dfilter/semcheck.c
index 02bea9194b..fb2ae8b9fd 100644
--- a/epan/dfilter/semcheck.c
+++ b/epan/dfilter/semcheck.c
@@ -472,9 +472,7 @@ dfilter_g_regex_from_string(dfwork_t *dfw, stnode_t *st)
static void
check_exists(dfwork_t *dfw, stnode_t *st_arg1)
{
-#ifndef WS_DISABLE_DEBUG
static guint i = 0;
-#endif
ws_debug("4 check_exists() [%u]", i++);
log_stnode(st_arg1);
@@ -1264,9 +1262,7 @@ check_relation(dfwork_t *dfw, const char *relation_string,
FtypeCanFunc can_func, stnode_t *st_node,
stnode_t *st_arg1, stnode_t *st_arg2)
{
-#ifndef WS_DISABLE_DEBUG
static guint i = 0;
-#endif
header_field_info *hfinfo;
char *s;
@@ -1350,9 +1346,7 @@ check_test(dfwork_t *dfw, stnode_t *st_node)
{
test_op_t st_op, st_arg_op;
stnode_t *st_arg1, *st_arg2;
-#ifndef WS_DISABLE_DEBUG
static guint i = 0;
-#endif
ws_debug("3 check_test(stnode_t *st_node = %p) [%u]\n", st_node, i++);
log_stnode(st_node);
@@ -1437,9 +1431,8 @@ check_test(dfwork_t *dfw, stnode_t *st_node)
static void
semcheck(dfwork_t *dfw, stnode_t *st_node)
{
-#ifndef WS_DISABLE_DEBUG
static guint i = 0;
-#endif
+
ws_debug("2 semcheck(stnode_t *st_node = %p) [%u]", st_node, i++);
/* The parser assures that the top-most syntax-tree
@@ -1461,9 +1454,7 @@ gboolean
dfw_semcheck(dfwork_t *dfw)
{
volatile gboolean ok_filter = TRUE;
-#ifndef WS_DISABLE_DEBUG
static guint i = 0;
-#endif
ws_debug("1 dfw_semcheck(dfwork_t *dfw = %p) [%u]", dfw, i);