You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building tests, we get this warning:
tst-mmap.hh:76:19: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
76 | char byte = **(volatile char**)&func;
| ^~~~~~~~~~~~~~~~~~~~~~
I think this code was actually wrong... func is a function pointer, not
a function, so its name already points to the function's code - there is no
reason to take &func. I'm not even sure how this works.
After this patch, the warning is gone, and the relevant test
(tst-elf-permissions.so) still passes.
Refs #976
Signed-off-by: Nadav Har'El <[email protected]>
Message-Id: <[email protected]>
0 commit comments