Skip to content

Moved lfs_mdir_isopen behind LFS_NO_ASSERT #499

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

Merged
merged 1 commit into from
Jan 18, 2021
Merged

Conversation

geky
Copy link
Member

@geky geky commented Dec 9, 2020

lfs_mdir_isopen goes unused if asserts are disabled, and this caused an "unused function" warning on Clang (curiously not on GCC since the function was static inline, commonly used for header-only functions).

Also removed "inline" from the lfs_mdir_* functions as these involve linked-list operations and really shouldn't be inlined. And since they are static, inlining should occur automatically if there is a benefit.

Found by @dpgeorge
Should fix #498

lfs_mdir_isopen goes unused if asserts are disabled, and this caused an
"unused function" warning on Clang (curiously not on GCC since the
function was static inline, commonly used for header-only functions).

Also removed "inline" from the lfs_mdir_* functions as these involve
linked-list operations and really shouldn't be inlined. And since they
are static, inlining should occur automatically if there is a benefit.

Found by dpgeorge
@geky geky added v2.4 needs minor version new functionality only allowed in minor versions and removed needs minor version new functionality only allowed in minor versions labels Jan 18, 2021
@geky geky added this to the v2.4 milestone Jan 18, 2021
@geky geky changed the base branch from master to devel January 18, 2021 17:40
@geky geky merged commit 10a0883 into devel Jan 18, 2021
@geky geky mentioned this pull request Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning about unused lfs_mlist_isopen
1 participant