From 17b0f36767b618fc1d548a799467a39acd21e1f8 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 21 Jul 2026 10:59:53 +0200 Subject: [PATCH] style(mt): keep serial reset C90-clean The MT serial-reset bridge now declares its Rust scalar projection before executing the diagnostic branch. This keeps the declaration ordering valid for the C90-oriented compiler flags used by the native test builds while leaving the Rust-owned policy and callback sequence unchanged. Test Plan: - `ulimit -v 41943040; CARGO_BUILD_JOBS=1 make -j1` -- passed without the new mixed-declaration warning. - `git diff --cached --check` -- passed. --- lib/compress/zstdmt_compress.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/compress/zstdmt_compress.c b/lib/compress/zstdmt_compress.c index fc4fe063b..aa6b0fd1b 100644 --- a/lib/compress/zstdmt_compress.c +++ b/lib/compress/zstdmt_compress.c @@ -1526,12 +1526,6 @@ ZSTDMT_serialState_reset(SerialState* serialState, ZSTD_dictContentType_e dictContentType) { ZSTDMT_serialResetContext context; - - /* Rust owns LDM normalization; retain the original diagnostic only. */ - if (params.ldmParams.enableLdm == ZSTD_ps_enable) { - DEBUGLOG(4, "LDM window size = %u KB", (1U << params.cParams.windowLog) >> 10); - } - ZSTDMT_RustSerialResetProjection const projection = { params.ldmParams.enableLdm, params.fParams.checksumFlag, @@ -1547,6 +1541,11 @@ ZSTDMT_serialState_reset(SerialState* serialState, sizeof(ldmEntry_t) }; + /* Rust owns LDM normalization; retain the original diagnostic only. */ + if (params.ldmParams.enableLdm == ZSTD_ps_enable) { + DEBUGLOG(4, "LDM window size = %u KB", (1U << params.cParams.windowLog) >> 10); + } + context.serialState = serialState; context.seqPool = seqPool; context.params = ¶ms;