OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_1-465-gc78e2b4
Gerrit Code Review
gerrit@openafs.org
Tue, 13 Aug 2024 12:39:48 -0400
The following commit has been merged in the master branch:
commit c78e2b4c646d6a87d40e18b527aba8cdb5f89ae4
Author: Michael Meffie <mmeffie@sinenomine.net>
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 <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
src/vol/volume.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository