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

Have dummy_forced_read only if it's used #11848

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maskit
Copy link
Member

@maskit maskit commented Nov 6, 2024

dummy_forced_read is unused if SANITY is not defined, and compilers warn unused function. The function is used like this (surrounded by ifdef SANITY):

#ifdef SANITY
if (result) {
if (FREELIST_POINTER(item) == TO_PTR(FREELIST_POINTER(next))) {
ink_abort("ink_freelist_new: loop detected");
}
if (((uintptr_t)(TO_PTR(FREELIST_POINTER(next)))) & 3) {
ink_abort("ink_freelist_new: bad list");
}
if (TO_PTR(FREELIST_POINTER(next))) {
dummy_forced_read(TO_PTR(FREELIST_POINTER(next)));
}
}
#endif /* SANITY */

@maskit maskit added the Build work related to build configuration or environment label Nov 6, 2024
@maskit maskit self-assigned this Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build work related to build configuration or environment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants