tests: ec_host_cmd: Make sure expected_dut_to_host fits in buffer
If struct tx_structure is too large than the buffer that
expected_dut_to_host references, leading the compiler to generate a warning
about the possibility of buffer overflow.
Leave out the 'struct ec_response_too_big' so that 'struct tx_structure'
fits within the 256 byte buffer.
This was caught when using GCC 11.3.0 building the test for native_posix.
Signed-off-by: Keith Packard <keithp@keithp.com>
diff --git a/tests/subsys/mgmt/ec_host_cmd/src/main.c b/tests/subsys/mgmt/ec_host_cmd/src/main.c
index b0c6865..f5c35f3 100644
--- a/tests/subsys/mgmt/ec_host_cmd/src/main.c
+++ b/tests/subsys/mgmt/ec_host_cmd/src/main.c
@@ -62,7 +62,6 @@
struct ec_host_cmd_response_header header;
union {
struct ec_response_add add;
- struct ec_response_too_big too_big;
uint8_t raw[0];
};
} __packed * const expected_dut_to_host = (void *)&expected_dut_to_host_buffer;