From 95eb6730def319d83f2f00126c63fc1e025c4599 Mon Sep 17 00:00:00 2001 From: Ebrahim Date: Wed, 25 Nov 2026 15:16:34 +0330 Subject: [PATCH] tests: scope MSVC C4815 suppression to reconstructor test MSVC 14.52, rolled out on the windows-2025-vs2026 image after 2026-11-20, diagnoses the intentional flexible-array base object under /W4 /WX. This is unrelated to the CRT-free backend; scope the suppression to the upstream reconstructor helper so the new compiler does not fail CI. Assisted-by: deepseek-harness:deepseek-flash --- windows/test/hid_report_reconstructor_test.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/windows/test/hid_report_reconstructor_test.c b/windows/test/hid_report_reconstructor_test.c index 3a910bf26..abe15bbf2 100644 --- a/windows/test/hid_report_reconstructor_test.c +++ b/windows/test/hid_report_reconstructor_test.c @@ -35,6 +35,10 @@ static const char* hidapi_strerror_compat(int errnum, char* buf, size_t buf_size #endif } +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable: 4815) +#endif static hidp_preparsed_data * alloc_preparsed_data_from_file(char* filename) { FILE* file; @@ -481,6 +485,9 @@ static hidp_preparsed_data * alloc_preparsed_data_from_file(char* filename) return pp_data; } +#if defined(_MSC_VER) +#pragma warning(pop) +#endif static BOOLEAN read_hex_data_from_text_file(const char *filename, unsigned char *data_out, size_t data_size, size_t *actual_read) {