From 92594574c206bd105370d366cadfa4116dead594 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 21 Jul 2026 09:32:07 +0200 Subject: [PATCH] fix(mt): keep job-table teardown C90-clean Move the Rust teardown projection declaration before the null guard so the MT source remains clean under the repository's C90 declaration rules. The initializer only copies pointers, scalars, the allocator, and the callback; the null guard still precedes the bridge call and preserves the existing no-op behavior for an absent job table. Test Plan: - git diff --cached --check - ulimit -v 41943040; CARGO_BUILD_JOBS=1 make -j1 -C tests test (passed before this warning-only fix) --- lib/compress/zstdmt_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress/zstdmt_compress.c b/lib/compress/zstdmt_compress.c index 947d32d91..89976a091 100644 --- a/lib/compress/zstdmt_compress.c +++ b/lib/compress/zstdmt_compress.c @@ -2239,7 +2239,6 @@ static void ZSTDMT_projectJob(void* opaque, unsigned jobID, static void ZSTDMT_freeJobsTable(ZSTDMT_jobDescription* jobTable, U32 nbJobs, ZSTD_customMem cMem) { - if (jobTable == NULL) return; ZSTDMT_RustFreeJobsTableProjection const projection = { jobTable, nbJobs, @@ -2247,6 +2246,7 @@ static void ZSTDMT_freeJobsTable(ZSTDMT_jobDescription* jobTable, U32 nbJobs, ZS cMem, ZSTDMT_job_table_destroy_sync }; + if (jobTable == NULL) return; ZSTDMT_rust_freeJobsTable(&projection); }