aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/wslua/lrexlib_algo.h12
-rw-r--r--epan/wslua/lrexlib_glib.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/epan/wslua/lrexlib_algo.h b/epan/wslua/lrexlib_algo.h
index 1578bb268f..350a7f838a 100644
--- a/epan/wslua/lrexlib_algo.h
+++ b/epan/wslua/lrexlib_algo.h
@@ -31,6 +31,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "lrexlib.h"
+#include <wsutil/ws_diag_control.h>
+
#ifdef LREXLIB_WIRESHARK
# define WSLUA_TYPEOF_FIELD "__typeof"
# define REX_CREATEGLOBALVAR
@@ -277,6 +279,7 @@ static void push_substrings (lua_State *L, TUserdata *ud, const char *text,
}
}
+DIAG_OFF(parentheses-equality)
static int algf_gsub (lua_State *L) {
TUserdata *ud;
TArgComp argC;
@@ -459,8 +462,10 @@ static int algf_gsub (lua_State *L) {
freelist_free (&freelist);
return 3;
}
+DIAG_ON(parentheses-equality)
+DIAG_OFF(parentheses-equality)
static int finish_generic_find (lua_State *L, TUserdata *ud, TArgExec *argE,
int method, int res)
{
@@ -480,6 +485,7 @@ static int finish_generic_find (lua_State *L, TUserdata *ud, TArgExec *argE,
else
return generate_error (L, ud, res);
}
+DIAG_ON(parentheses-equality)
static int generic_find_func (lua_State *L, int method) {
@@ -512,6 +518,7 @@ static int algf_match (lua_State *L) {
}
+DIAG_OFF(parentheses-equality)
static int gmatch_iter (lua_State *L) {
int retry;
TArgExec argE;
@@ -572,8 +579,10 @@ static int gmatch_iter (lua_State *L) {
return generate_error (L, ud, res);
}
}
+DIAG_ON(parentheses-equality)
+DIAG_OFF(parentheses-equality)
static int split_iter (lua_State *L) {
int incr, newoffset, res;
TArgExec argE;
@@ -619,6 +628,7 @@ nomatch:
lua_pushlstring (L, argE.text+argE.startoffset, argE.textlen-argE.startoffset);
return 1;
}
+DIAG_ON(parentheses-equality)
static int algf_gmatch (lua_State *L)
@@ -694,6 +704,7 @@ static void push_offset_table (lua_State *L, TUserdata *ud, int startoffset) {
}
+DIAG_OFF(parentheses-equality)
static int generic_find_method (lua_State *L, int method) {
TUserdata *ud;
TArgExec argE;
@@ -727,6 +738,7 @@ static int generic_find_method (lua_State *L, int method) {
else
return generate_error(L, ud, res);
}
+DIAG_ON(parentheses-equality)
static int algm_find (lua_State *L) {
diff --git a/epan/wslua/lrexlib_glib.c b/epan/wslua/lrexlib_glib.c
index fd24c28a5c..91043410ab 100644
--- a/epan/wslua/lrexlib_glib.c
+++ b/epan/wslua/lrexlib_glib.c
@@ -276,6 +276,7 @@ static void checkarg_dfa_exec (lua_State *L, TArgExec *argE, TGrgx **ud) {
argE->eflags = ALG_GETEFLAGS (L, 4);
}
+DIAG_OFF(parentheses-equality)
/* unlike PCRE, partial matching won't return the actual substrings/matches */
static int Gregex_dfa_exec (lua_State *L)
{
@@ -319,6 +320,7 @@ static int Gregex_dfa_exec (lua_State *L)
return generate_error (L, ud, 0);
}
}
+DIAG_ON(parentheses-equality)
#ifdef ALG_USERETRY
static int gmatch_exec (TUserdata *ud, TArgExec *argE, int retry) {