CSAL
CSAL copied to clipboard
Fix compilation issue when BAREMETAL flag is set
When compiling for BAREMETAL functions the functions under define is in use also (it's in use not only for DEBUG as stated in the comment)
I can't reproduce a bug here. There were a couple other issues with BAREMETAL, which I've now fixed. In particular BAREMETAL no longer tries to build the demo tools.
These functions are only used in asserts internally in cs_topology.c. They are not exported as part of the library API. If you build CSAL with DEBUG=1 they will be compiled. If you build with DEBUG=0, the makefile will set NDEBUG=1 which should define assert() as ((void)0) or similar. I wonder if your compiler evaluates the argument to assert() even in a non-debug build. Or are you using a different makefile, which ends up with neither DEBUG nor NDEBUG set?
Do you mean that you would find it useful if they were exported? We could consider that but the header would need changing as well.