Improve macro guards for ZSTD_assertValidSequence
Refine the macro guards to define the functions exactly when they are needed. This fixes the chromium build with zstd. Thanks to @GregTho for reporting!
This commit is contained in:
committed by
Nick Terrell
parent
1c007e64b8
commit
cdceb0fce5
@@ -1340,8 +1340,9 @@ ZSTD_decodeSequence(seqState_t* seqState, const ZSTD_longOffset_e longOffsets, c
|
|||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) && defined(FUZZING_ASSERT_VALID_SEQUENCE)
|
||||||
MEM_STATIC int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* prefixStart, BYTE const* oLitEnd)
|
#if DEBUGLEVEL >= 1
|
||||||
|
static int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* prefixStart, BYTE const* oLitEnd)
|
||||||
{
|
{
|
||||||
size_t const windowSize = dctx->fParams.windowSize;
|
size_t const windowSize = dctx->fParams.windowSize;
|
||||||
/* No dictionary used. */
|
/* No dictionary used. */
|
||||||
@@ -1355,8 +1356,9 @@ MEM_STATIC int ZSTD_dictionaryIsActive(ZSTD_DCtx const* dctx, BYTE const* prefix
|
|||||||
/* Dictionary is active. */
|
/* Dictionary is active. */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
MEM_STATIC void ZSTD_assertValidSequence(
|
static void ZSTD_assertValidSequence(
|
||||||
ZSTD_DCtx const* dctx,
|
ZSTD_DCtx const* dctx,
|
||||||
BYTE const* op, BYTE const* oend,
|
BYTE const* op, BYTE const* oend,
|
||||||
seq_t const seq,
|
seq_t const seq,
|
||||||
|
|||||||
Reference in New Issue
Block a user