aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/expression.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-11-04 21:11:33 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-11-04 21:11:33 +0000
commitb2f0dd775c6d3f78234c5e2d1118eac21490bbd5 (patch)
treeaee4eb0059e2a9b05b3ed39c24e88bcde20bb0b4 /src/libutil/expression.c
parentf85dfb2f0b80ea030e7106534d1d00b29311ce80 (diff)
downloadrspamd-b2f0dd775c6d3f78234c5e2d1118eac21490bbd5.tar.gz
rspamd-b2f0dd775c6d3f78234c5e2d1118eac21490bbd5.zip
[Minor] Get rid of some compiler warnings
Diffstat (limited to 'src/libutil/expression.c')
-rw-r--r--src/libutil/expression.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/expression.c b/src/libutil/expression.c
index e6992a2d8..40fcc2591 100644
--- a/src/libutil/expression.c
+++ b/src/libutil/expression.c
@@ -1339,7 +1339,7 @@ rspamd_ast_process_node (struct rspamd_expression *e, GNode *node,
float t1, t2;
gdouble val;
gboolean calc_ticks = FALSE;
- const gchar *op_name = NULL;
+ __attribute__((unused)) const gchar *op_name = NULL;
elt = node->data;
@@ -1382,7 +1382,9 @@ rspamd_ast_process_node (struct rspamd_expression *e, GNode *node,
break;
case ELT_OP:
g_assert (node->children != NULL);
+#ifdef DEBUG_EXPRESSIONS
op_name = rspamd_expr_op_to_str (elt->p.op.op);
+#endif
if (elt->p.op.op_flags & RSPAMD_EXPRESSION_NARY) {
msg_debug_expression_verbose ("proceed nary operation %s", op_name);