Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation issue when BAREMETAL flag is set #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davkap15
Copy link
Contributor

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)

@algrant-arm
Copy link
Contributor

algrant-arm commented Nov 21, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants