[pacman-dev] [PATCH v2] alpm: Fix possible alignment issues w/ events
Andrew Gregory
andrew.gregory.8 at gmail.com
Mon Jan 4 09:58:24 UTC 2016
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 at 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
More information about the pacman-dev
mailing list