Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

glibc 2.25 compat: remove assert(X=Y) #610

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

ofaaland
Copy link
Contributor

The assert() related definitions in glibc 2.25 were altered to warn
about assert(X=Y) when -Wparentheses is used. See
https://abi-laboratory.pro/tracker/changelog/glibc/2.25/log.html

lib/list.c used this construct to set the value of a magic field which
is defined only when debugging.

Replaced the assert()s with #ifndef/#endifs.

Signed-off-by: Olaf Faaland [email protected]

The assert() related definitions in glibc 2.25 were altered to warn
about assert(X=Y) when -Wparentheses is used.  See
https://abi-laboratory.pro/tracker/changelog/glibc/2.25/log.html

lib/list.c used this construct to set the value of a magic field which
is defined only when debugging.

Replaced the assert()s with #ifndef/#endifs.

Signed-off-by: Olaf Faaland <[email protected]>
@ofaaland
Copy link
Contributor Author

ofaaland commented Mar 31, 2017

This was detected building on arch, which as of about 2 weeks ago was using glibc 2.25. The build fails due to -Wparentheses being promoted to an error.

Tested with
splat --all
both with debug and non-debug builds. All 70 tests Pass.

@behlendorf behlendorf merged commit 481762f into openzfs:master Apr 3, 2017
@ofaaland ofaaland deleted the b_no_assert_abuse branch April 10, 2017 17:20
tonyhutter pushed a commit to tonyhutter/spl that referenced this pull request May 23, 2017
The assert() related definitions in glibc 2.25 were altered to warn
about assert(X=Y) when -Wparentheses is used.  See
https://abi-laboratory.pro/tracker/changelog/glibc/2.25/log.html

lib/list.c used this construct to set the value of a magic field which
is defined only when debugging.

Replaced the assert()s with #ifndef/#endifs.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Olaf Faaland <[email protected]>
Closes openzfs#610
tonyhutter pushed a commit that referenced this pull request Jun 9, 2017
The assert() related definitions in glibc 2.25 were altered to warn
about assert(X=Y) when -Wparentheses is used.  See
https://abi-laboratory.pro/tracker/changelog/glibc/2.25/log.html

lib/list.c used this construct to set the value of a magic field which
is defined only when debugging.

Replaced the assert()s with #ifndef/#endifs.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Olaf Faaland <[email protected]>
Closes #610
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants