Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FreeRTOS_DHCP_utest: Fix it for Gcc 11
Symptom: The call to FreeRTOS_recvfrom_ExpectAndReturn() clearly specifies that FreeRTOS_recvfrom() shall return the (NULL, 0) slice. But instead, it returns a random pointer and a lenght of 1. This happens only with Gcc 11 with AddressSanitizer, but no other compiler does that with or without AddressSanitizer. A random hunch: All other calls to FreeRTOS_recvfrom_ExpectAndReturn() set cmock_to_return=0 instead of 1. Last ditch attempt before ditching Gcc 11: I don't know what cmock_to_return is, but doing the same fixes the last AddressSanitizer error under Gcc 11 run by CI, and of course also works for all other builds I'm testing with.
- Loading branch information