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 UNUSED Macro declaration #614

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

GabrielGanne
Copy link
Contributor

Depending on compilaiton flags, UNUSED() was declaring variables with
different names.
Meaning the following can be either expanded to:
UNUSED(var) -> var
UNUSED(var) -> UNUSED_var __attribute__((unused))
depending on the compilation flags.

The code using such a variable would need to also be conditional to the
same compilation flags ... and that's to heavy.
Let's declare variables by the name they are given instead.
UNUSED(var) -> var /* with/without the attribute, but always "var" */

Fixes #612

Signed-off-by: Gabriel Ganne [email protected]

Depending on compilaiton flags, UNUSED() was declaring variables with
different names.
Meaning the following can be either expanded to:
  UNUSED(var) -> var
  UNUSED(var) -> UNUSED_var __attribute__((unused))
depending on the compilation flags.

The code using such a variable would need to also be conditional to the
same compilation flags ... and that's to heavy.
Let's declare variables by the name they are given instead.
  UNUSED(var) -> var /* with/without the attribute, but always "var" */

Fixes appneta#612

Signed-off-by: Gabriel Ganne <[email protected]>
@fklassen fklassen changed the base branch from master to 4.3.4 March 12, 2021 20:06
@fklassen fklassen self-requested a review March 12, 2021 20:06
@fklassen fklassen marked this pull request as draft March 12, 2021 22:18
@fklassen fklassen marked this pull request as ready for review March 12, 2021 22:22
@fklassen fklassen merged commit 1621e1d into appneta:4.3.4 Mar 12, 2021
@GabrielGanne GabrielGanne deleted the unused-macro-definition branch October 14, 2024 11:50
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.

[BUG] sendpacket.c:977:5: fatal error: use of undeclared identifier 'mtu'
2 participants