-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
It has been patched with (Added array_as_byte config options ) to support anonymous structures to prevent following failure:
FAILED: applications/zpc/components/zwave/zwave_transports/s2/CMakeFiles/libs2_mock.dir/mocks/s2_inclusion_mock.c.o
/home/phcoval/mnt/z-wave-protocol-controller/build/applications/zpc/components/zwave/zwave_transports/s2/mocks/s2_inclusion_mock.c: In function ‘s2_inclusion_challenge_response’:
/home/phcoval/mnt/z-wave-protocol-controller/build/applications/zpc/components/zwave/zwave_transports/s2/mocks/s2_inclusion_mock.c:486:123: error: invalid application of ‘sizeof’ to incomplete type ‘struct S2’
486 | { UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((void*)(cmock_call_instance->Expected_p_context), (void*)(p_context), sizeof(struct S2), cmock_call_instance->Expected_p_context_Depth, cmock_line, CMockStringMismatch); }
/home/phcoval/mnt/z-wave-protocol-controller/build/_deps/cmock-src/vendor/unity/src/unity_internals.h:896:198: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY’
896 | #define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)
This is introducing technical debt , we might need to find a better solution:
- option 1: upstream the patch (WIP)
- Origin-SiliconLabs: v2.5.1-74-ga078d10
- Origin-Upstream: Added array_as_byte config options. ThrowTheSwitch/CMock#503
- option 2: rework S2 to avoid anonymous struct (longer term)
Metadata
Metadata
Assignees
Labels
No labels