Skip to content

Fix UNUSED Macro declaration#614

Merged
fklassen merged 1 commit intoappneta:4.3.4from
GabrielGanne:unused-macro-definition
Mar 12, 2021
Merged

Fix UNUSED Macro declaration#614
fklassen merged 1 commit intoappneta:4.3.4from
GabrielGanne:unused-macro-definition

Conversation

@GabrielGanne
Copy link
Copy Markdown
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 gabriel.ganne@gmail.com

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 <gabriel.ganne@gmail.com>
@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