On Mon, 4 Jan 2016 04:58:24 -0500 Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
On 01/02/16 at 10:14pm, Olivier Brunel wrote:
As reported by Rikard Falkeborn[1] using event-specific struct and then typecasting to the generic alpm_event_t could possibly lead to alignment issue, so we now always use alpm_event_t instead.
[1] https://lists.archlinux.org/pipermail/pacman-dev/2015-December/020709.html
Signed-off-by: Olivier Brunel <jjk@jjacky.com> --- Now always using the union member, to avoid initializer warnings (thanks Rikard) and better consistency. Hopefully this time it's all good.
lib/libalpm/add.c | 44 ++++++++++++++++++++++---------------------- lib/libalpm/be_sync.c | 6 +++--- lib/libalpm/handle.h | 2 +- lib/libalpm/hook.c | 22 +++++++++++----------- lib/libalpm/remove.c | 28 ++++++++++++++-------------- lib/libalpm/sync.c | 14 +++++++------- lib/libalpm/trans.c | 2 +- lib/libalpm/util.c | 6 +++--- 8 files changed, 62 insertions(+), 62 deletions(-)
Is there any reason not to just silence the warning by casting the event to (void*)?
apg
hmm... I guess not. If that does silence the warning it would be a simpler "fix" indeed. Again I don't have clang so I can't test, but it should be enough indeed, so just changing the typecast in EVENT() should do it -- I assume a patch isn't needed then? -j