mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Custom NFA_API_NO_IMPL variant for zombie_status
Silences ICC warning #188: enumerated type mixed with another type.
This commit is contained in:
parent
a2f2e11e60
commit
b59491d0db
@ -54,7 +54,7 @@ char nfaExecCastle0_expandState(const struct NFA *nfa, void *dest,
|
|||||||
|
|
||||||
#define nfaExecCastle0_testEOD NFA_API_NO_IMPL
|
#define nfaExecCastle0_testEOD NFA_API_NO_IMPL
|
||||||
#define nfaExecCastle0_B_Reverse 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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ char nfaExecGough8_expandState(const struct NFA *nfa, void *dest,
|
|||||||
const void *src, u64a offset, u8 key);
|
const void *src, u64a offset, u8 key);
|
||||||
|
|
||||||
#define nfaExecGough8_B_Reverse NFA_API_NO_IMPL
|
#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
|
// 16-bit Gough
|
||||||
|
|
||||||
@ -77,6 +77,6 @@ char nfaExecGough16_expandState(const struct NFA *nfa, void *dest,
|
|||||||
const void *src, u64a offset, u8 key);
|
const void *src, u64a offset, u8 key);
|
||||||
|
|
||||||
#define nfaExecGough16_B_Reverse NFA_API_NO_IMPL
|
#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
|
#endif
|
||||||
|
@ -56,7 +56,7 @@ char nfaExecLbrDot_expandState(const struct NFA *nfa, void *dest,
|
|||||||
|
|
||||||
#define nfaExecLbrDot_testEOD NFA_API_NO_IMPL
|
#define nfaExecLbrDot_testEOD NFA_API_NO_IMPL
|
||||||
#define nfaExecLbrDot_B_Reverse 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
|
// LBR Verm
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ char nfaExecLbrVerm_expandState(const struct NFA *nfa, void *dest,
|
|||||||
|
|
||||||
#define nfaExecLbrVerm_testEOD NFA_API_NO_IMPL
|
#define nfaExecLbrVerm_testEOD NFA_API_NO_IMPL
|
||||||
#define nfaExecLbrVerm_B_Reverse 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
|
// 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_testEOD NFA_API_NO_IMPL
|
||||||
#define nfaExecLbrNVerm_B_Reverse 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
|
// LBR Shuf
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ char nfaExecLbrShuf_expandState(const struct NFA *nfa, void *dest,
|
|||||||
|
|
||||||
#define nfaExecLbrShuf_testEOD NFA_API_NO_IMPL
|
#define nfaExecLbrShuf_testEOD NFA_API_NO_IMPL
|
||||||
#define nfaExecLbrShuf_B_Reverse 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
|
// LBR Truffle
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ char nfaExecLbrTruf_expandState(const struct NFA *nfa, void *dest,
|
|||||||
|
|
||||||
#define nfaExecLbrTruf_testEOD NFA_API_NO_IMPL
|
#define nfaExecLbrTruf_testEOD NFA_API_NO_IMPL
|
||||||
#define nfaExecLbrTruf_B_Reverse 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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ char nfaExecMcClellan8_expandState(const struct NFA *nfa, void *dest,
|
|||||||
const void *src, u64a offset, u8 key);
|
const void *src, u64a offset, u8 key);
|
||||||
|
|
||||||
#define nfaExecMcClellan8_B_Reverse NFA_API_NO_IMPL
|
#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
|
// 16-bit McClellan
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ char nfaExecMcClellan16_expandState(const struct NFA *nfa, void *dest,
|
|||||||
const void *src, u64a offset, u8 key);
|
const void *src, u64a offset, u8 key);
|
||||||
|
|
||||||
#define nfaExecMcClellan16_B_Reverse NFA_API_NO_IMPL
|
#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:
|
* Simple streaming mode calls:
|
||||||
|
@ -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_QR NFA_API_NO_IMPL
|
||||||
#define nfaExecMpv0_Q2 NFA_API_NO_IMPL /* for non-chained suffixes. */
|
#define nfaExecMpv0_Q2 NFA_API_NO_IMPL /* for non-chained suffixes. */
|
||||||
#define nfaExecMpv0_B_Reverse NFA_API_NO_IMPL
|
#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
|
* return 0 if the mpv dies, otherwise returns the location of the next possible
|
||||||
|
@ -237,16 +237,32 @@ static really_inline
|
|||||||
int isMultiTopType(u8 t) {
|
int isMultiTopType(u8 t) {
|
||||||
return !isDfaType(t) && !isLbrType(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. */
|
* engine. */
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
|
|
||||||
|
/* Use for functions that return an integer. */
|
||||||
#define NFA_API_NO_IMPL(...) \
|
#define NFA_API_NO_IMPL(...) \
|
||||||
({ \
|
({ \
|
||||||
assert("not implemented for this engine!"); \
|
assert("not implemented for this engine!"); \
|
||||||
0; /* return value, for places that need it */ \
|
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
|
#else
|
||||||
|
|
||||||
|
/* Simpler implementation for compilers that don't like the GCC extension used
|
||||||
|
* above. */
|
||||||
#define NFA_API_NO_IMPL(...) 0
|
#define NFA_API_NO_IMPL(...) 0
|
||||||
|
#define NFA_API_ZOMBIE_NO_IMPL(...) NFA_ZOMBIE_NO
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user