Remove enum mqe_event and use u32 for queue events

We were using intermediate values int he enum and casting back and forth
with a u32; it is cleaner to just use a u32 and define some special
values.

Silences ICC warning #188: enumerated type mixed with another type.
This commit is contained in:
Justin Viiret
2015-10-23 10:59:48 +11:00
committed by Matthew Barr
parent 9ff1303cd8
commit 55b357f7d1
6 changed files with 29 additions and 25 deletions

View File

@@ -151,12 +151,12 @@ char JOIN(ENGINE_EXEC_NAME, _TopScan)(const struct NFA *nfa, struct mq *q,
while (1) {
// Find the next top with location >= the last escape we saw.
for (; q->cur < q->end && q_cur_loc(q) <= end; q->cur++) {
enum mqe_event t = q_cur_type(q);
if ((t == MQE_TOP || t == MQE_TOP_FIRST) &&
u32 event = q_cur_type(q);
if ((event == MQE_TOP || event == MQE_TOP_FIRST) &&
q_cur_offset(q) >= lstate->lastEscape) {
goto found_top;
}
DEBUG_PRINTF("skip event type=%d offset=%lld\n", t, q_cur_offset(q));
DEBUG_PRINTF("skip event type=%u offset=%lld\n", event, q_cur_offset(q));
}
// No more tops, we're done.