Custom NFA_API_NO_IMPL variant for zombie_status

Silences ICC warning #188: enumerated type mixed with another type.
This commit is contained in:
Justin Viiret 2015-10-23 11:39:31 +11:00 committed by Matthew Barr
parent a2f2e11e60
commit b59491d0db
6 changed files with 30 additions and 14 deletions

View File

@ -54,7 +54,7 @@ char nfaExecCastle0_expandState(const struct NFA *nfa, void *dest,
#define nfaExecCastle0_testEOD NFA_API_NO_IMPL
#define nfaExecCastle0_B_Reverse NFA_API_NO_IMPL
#define nfaExecCastle0_zombie_status NFA_API_NO_IMPL
#define nfaExecCastle0_zombie_status NFA_API_ZOMBIE_NO_IMPL
#ifdef __cplusplus
}

View File

@ -55,7 +55,7 @@ char nfaExecGough8_expandState(const struct NFA *nfa, void *dest,
const void *src, u64a offset, u8 key);
#define nfaExecGough8_B_Reverse NFA_API_NO_IMPL
#define nfaExecGough8_zombie_status NFA_API_NO_IMPL
#define nfaExecGough8_zombie_status NFA_API_ZOMBIE_NO_IMPL
// 16-bit Gough
@ -77,6 +77,6 @@ char nfaExecGough16_expandState(const struct NFA *nfa, void *dest,
const void *src, u64a offset, u8 key);
#define nfaExecGough16_B_Reverse NFA_API_NO_IMPL
#define nfaExecGough16_zombie_status NFA_API_NO_IMPL
#define nfaExecGough16_zombie_status NFA_API_ZOMBIE_NO_IMPL
#endif

View File

@ -56,7 +56,7 @@ char nfaExecLbrDot_expandState(const struct NFA *nfa, void *dest,
#define nfaExecLbrDot_testEOD NFA_API_NO_IMPL
#define nfaExecLbrDot_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrDot_zombie_status NFA_API_NO_IMPL
#define nfaExecLbrDot_zombie_status NFA_API_ZOMBIE_NO_IMPL
// LBR Verm
@ -76,7 +76,7 @@ char nfaExecLbrVerm_expandState(const struct NFA *nfa, void *dest,
#define nfaExecLbrVerm_testEOD NFA_API_NO_IMPL
#define nfaExecLbrVerm_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrVerm_zombie_status NFA_API_NO_IMPL
#define nfaExecLbrVerm_zombie_status NFA_API_ZOMBIE_NO_IMPL
// LBR Negated Verm
@ -96,7 +96,7 @@ char nfaExecLbrNVerm_expandState(const struct NFA *nfa, void *dest,
#define nfaExecLbrNVerm_testEOD NFA_API_NO_IMPL
#define nfaExecLbrNVerm_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrNVerm_zombie_status NFA_API_NO_IMPL
#define nfaExecLbrNVerm_zombie_status NFA_API_ZOMBIE_NO_IMPL
// LBR Shuf
@ -116,7 +116,7 @@ char nfaExecLbrShuf_expandState(const struct NFA *nfa, void *dest,
#define nfaExecLbrShuf_testEOD NFA_API_NO_IMPL
#define nfaExecLbrShuf_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrShuf_zombie_status NFA_API_NO_IMPL
#define nfaExecLbrShuf_zombie_status NFA_API_ZOMBIE_NO_IMPL
// LBR Truffle
@ -136,7 +136,7 @@ char nfaExecLbrTruf_expandState(const struct NFA *nfa, void *dest,
#define nfaExecLbrTruf_testEOD NFA_API_NO_IMPL
#define nfaExecLbrTruf_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrTruf_zombie_status NFA_API_NO_IMPL
#define nfaExecLbrTruf_zombie_status NFA_API_ZOMBIE_NO_IMPL
#ifdef __cplusplus
}

View File

@ -56,7 +56,7 @@ char nfaExecMcClellan8_expandState(const struct NFA *nfa, void *dest,
const void *src, u64a offset, u8 key);
#define nfaExecMcClellan8_B_Reverse NFA_API_NO_IMPL
#define nfaExecMcClellan8_zombie_status NFA_API_NO_IMPL
#define nfaExecMcClellan8_zombie_status NFA_API_ZOMBIE_NO_IMPL
// 16-bit McClellan
@ -79,7 +79,7 @@ char nfaExecMcClellan16_expandState(const struct NFA *nfa, void *dest,
const void *src, u64a offset, u8 key);
#define nfaExecMcClellan16_B_Reverse NFA_API_NO_IMPL
#define nfaExecMcClellan16_zombie_status NFA_API_NO_IMPL
#define nfaExecMcClellan16_zombie_status NFA_API_ZOMBIE_NO_IMPL
/**
* Simple streaming mode calls:

View File

@ -50,7 +50,7 @@ char nfaExecMpv0_expandState(const struct NFA *nfa, void *dest, const void *src,
#define nfaExecMpv0_QR NFA_API_NO_IMPL
#define nfaExecMpv0_Q2 NFA_API_NO_IMPL /* for non-chained suffixes. */
#define nfaExecMpv0_B_Reverse NFA_API_NO_IMPL
#define nfaExecMpv0_zombie_status NFA_API_NO_IMPL
#define nfaExecMpv0_zombie_status NFA_API_ZOMBIE_NO_IMPL
/**
* return 0 if the mpv dies, otherwise returns the location of the next possible

View File

@ -237,16 +237,32 @@ static really_inline
int isMultiTopType(u8 t) {
return !isDfaType(t) && !isLbrType(t);
}
/** Macro used in place of unimplemented NFA API functions for a given
/** Macros used in place of unimplemented NFA API functions for a given
* engine. */
#if !defined(_WIN32)
#define NFA_API_NO_IMPL(...) \
/* Use for functions that return an integer. */
#define NFA_API_NO_IMPL(...) \
({ \
assert("not implemented for this engine!"); \
0; /* return value, for places that need it */ \
})
/* Use for _zombie_status functions. */
#define NFA_API_ZOMBIE_NO_IMPL(...) \
({ \
assert("not implemented for this engine!"); \
NFA_ZOMBIE_NO; \
})
#else
#define NFA_API_NO_IMPL(...) 0
/* Simpler implementation for compilers that don't like the GCC extension used
* above. */
#define NFA_API_NO_IMPL(...) 0
#define NFA_API_ZOMBIE_NO_IMPL(...) NFA_ZOMBIE_NO
#endif
#ifdef __cplusplus