The following commit has been merged in the master branch:
commit c78e2b4c646d6a87d40e18b527aba8cdb5f89ae4
Author: Michael Meffie <[email protected]>
Date: Thu Aug 1 16:18:48 2024 -0400
LWP: Avoid casting functions to void pointer
Commit 09aba81c50cb (Cast LWP event functions to void pointer) fixed a
compiler warning when building binaries with LWP threaded, but did so in
a way that appeased the compiler but did not address the underlying
undefined behavior.
The ISO C standard states "a pointer to any object type may be converted
to a pointer to void and back again; the result shall compare equal to
the original pointer", but since a function is not defined as an object,
the conversion of function pointer to a void pointer is undefined.
Fix this by creating dummy integer globals to be used as the event ids
for the few places function pointers are used for event ids. The values
of the dummy variables are set but are never read.
Change-Id: I00084b882fe62cb0a82963ef45c390e5082c6fab
Reviewed-on: https://gerrit.openafs.org/15794
Tested-by: BuildBot <[email protected]>
Reviewed-by: Mark Vitale <[email protected]>
Reviewed-by: Cheyenne Wills <[email protected]>
Reviewed-by: Michael Meffie <[email protected]>
src/vol/volume.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs