From 1379ee83ab52464e1c20335d50c6845528e127e5 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Tue, 21 Jul 2026 14:37:41 +0200 Subject: [PATCH] style(cli): preserve C90 declaration ordering Move the decompression-resource state declaration ahead of the first statement in FIO_createDResources. The initializer only captures the resource address, so moving memset after the declaration preserves the runtime order while avoiding the ISO C90 mixed-declaration warning. Test Plan: - ulimit -v 41943040; CARGO_BUILD_JOBS=1 make -j1 (passed after cleanup) - ulimit -v 41943040; CARGO_BUILD_JOBS=1 make -j1 -C tests test (passed before this declaration-only cleanup) - git diff --check (passed) --- programs/fileio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/programs/fileio.c b/programs/fileio.c index bde1f9711..c09326e4f 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -4006,8 +4006,6 @@ static int FIO_rust_createDResources_isError(size_t result) static dRess_t FIO_createDResources(FIO_prefs_t* const prefs, const char* dictFileName) { dRess_t ress; - memset(&ress, 0, sizeof(ress)); - FIO_rust_createDResourcesState const state = { &ress, prefs, @@ -4021,6 +4019,7 @@ static dRess_t FIO_createDResources(FIO_prefs_t* const prefs, const char* dictFi FIO_rust_createDResources_createReadPool, FIO_rust_createDResources_isError }; + memset(&ress, 0, sizeof(ress)); CHECK(FIO_rust_createDResources(&state)); return ress; }