Introduce internal includes section to avoid potential implicit declaration warnings by ycherniavskyi · Pull Request #219 · OpenCyphal/libcanard (original) (raw)

Thank you. At first, I thought it violates AUTOSAR C++ M16-0-1, but upon closer inspection, I see that this solution is compliant.

I tried to push the following corrections before merging but your fork is not writable for me; please apply them yourself and request another review:

diff --git a/README.md b/README.md index 4ebc819..f651750 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,11 @@ If you find the examples to be unclear or incorrect, please, open a ticket.

+#### v3.1.2 + +- Allow redefinition of CANARD_ASSERT via the config header;

diff --git a/libcanard/canard.c b/libcanard/canard.c index 5cd28aa..863de50 100644 --- a/libcanard/canard.c +++ b/libcanard/canard.c @@ -38,6 +38,7 @@ #endif

// --------------------------------------------- INTERNAL INCLUDES ---------------------------------------------- +// The internal includes are placed here after the config header is included and CANARD_ASSERT is defined.

#include "_canard_cavl.h"