From c82392e3d5b8a2e0deacbbec297006122d3678b9 Mon Sep 17 00:00:00 2001 From: Chaosheng Qu Date: Sun, 22 Nov 2026 10:48:49 +0800 Subject: [PATCH] minicoro: suppress the MSVC padding warning for _mco_fiber C4324 is raised because the reverse-engineered CONTEXT field forces padding; the layout is intentional and the warning is not actionable. Keep it scoped to the struct. --- 3rdparty/minicoro/minicoro.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/3rdparty/minicoro/minicoro.h b/3rdparty/minicoro/minicoro.h index a93421db0..ea746e62c 100644 --- a/3rdparty/minicoro/minicoro.h +++ b/3rdparty/minicoro/minicoro.h @@ -1337,6 +1337,10 @@ static void _mco_jumpout(mco_coro* co) { } /* Reverse engineered Fiber struct, used to get stack base. */ +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable : 4324) /* CONTEXT forces alignment padding; benign. */ +#endif typedef struct _mco_fiber { LPVOID param; /* fiber param */ void* except; /* saved exception handlers list */ @@ -1348,6 +1352,9 @@ typedef struct _mco_fiber { LPFIBER_START_ROUTINE start; /* start routine */ void **fls_slots; /* fiber storage slots */ } _mco_fiber; +#if defined(_MSC_VER) +#pragma warning(pop) +#endif static mco_result _mco_create_context(mco_coro* co, mco_desc* desc) { /* Determine the context address. */