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

Normalize ifdef macro handlings for configs #1694

Merged
merged 3 commits into from
Nov 26, 2023

Conversation

casaroli
Copy link
Contributor

@casaroli casaroli commented Oct 22, 2023

fixes warnings or build error when macros are undefined or set to 0

When they are set to 0, nng does not even build due to undefined references.

When they are unset, we get many warnings, like:

nng/src/core/panic.c:26:5: warning: "NNG_HAVE_BACKTRACE" is not defined, evaluates to 0 [-Wundef]
   26 | #if NNG_HAVE_BACKTRACE

This fixes by using ifdef everywhere, so we don't get any warnings when the macros are not set.

Note that the above format should be used in your git commit comments.
You agree that by submitting a PR, you have read and agreed to our
contributing guidelines.

In some places, we use ifdef, and others if.

This normalizes for always using ifdef, so we can compile when
this macro is not defined.
In some places, we use ifdef, and others if.

This normalizes for always using ifdef, so we can compile when
this macro is not defined.
In some places, we use ifdef, and others if.

This normalizes for always using ifdef, so we can compile when
this macro is not defined.
@gdamore gdamore merged commit 0bc1fea into nanomsg:master Nov 26, 2023
6 of 8 checks passed
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