# undef REL_ALLOC
#endif
+#include "sxe-utils.h"
+
/* The `emacs' switch turns on certain matching commands
that make sense only in Emacs. */
#ifdef emacs
string2, size2); \
DEBUG_PRINT1("'\n"); \
\
- pat = (unsigned char *) POP_FAILURE_POINTER(); \
+ pat = (const unsigned char*)POP_FAILURE_POINTER(); \
DEBUG_PRINT2 (" Popping pattern %p: ", pat); \
DEBUG_PRINT_COMPILED_PATTERN(bufp, pat, pend); \
\
/* fuck, p isnt const thanks to that
* unified range table function below */
#ifdef MULE
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-qual"
p = (unsigned char*)fail_stack.
stack[--fail_stack.avail].pointer;
+#pragma GCC diagnostic pop
#else
p = fail_stack.stack[--fail_stack.avail]
.pointer;
dummy_low_reg, dummy_high_reg,
reg_dummy, reg_dummy,
reg_info_dummy);
+ SXE_SET_UNUSED(pdummy), SXE_SET_UNUSED(sdummy);
}
/* Note fall through. */
if (!FAIL_STACK_EMPTY()) {
/* A restart point is known. Restore to that state. */
DEBUG_PRINT1("\nFAIL:\n");
- POP_FAILURE_POINT(d, p, lowest_active_reg,
+
+ const unsigned char* cpat = p;
+
+ POP_FAILURE_POINT(d, cpat, lowest_active_reg,
highest_active_reg, regstart, regend,
reg_info);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-qual"
+ p = (unsigned char*)cpat;
+#pragma GCC diagnostic pop
/* If this failure point is a dummy, try the next one. */
if (!p)
case set_number_at:
p1 += 4;
+ break;
default:
/* All other opcodes mean we cannot match the empty string. */