summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/hook.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2016-01-15 05:52:05 +0100
committerAllan McRae <allan@archlinux.org>2016-01-15 05:52:05 +0100
commit8d9890d3f4c18189eb13ebc8612e3df56a4c9589 (patch)
tree81ff50684be78e086dac10b410b12f584490f7be /lib/libalpm/hook.c
parentab50864a758a7c3d26d5423521743c5753a6cffe (diff)
downloadpacman-8d9890d3f4c18189eb13ebc8612e3df56a4c9589.tar.gz
pacman-8d9890d3f4c18189eb13ebc8612e3df56a4c9589.tar.xz
Cast events to void* before passing to callback
Silence warnings from clang about typecasting alignment. Reported-by: Rikard Falkeborn Original-patch-by: Olivier Brunel Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/hook.c')
-rw-r--r--lib/libalpm/hook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/hook.c b/lib/libalpm/hook.c
index 49a5dae1..ed79fdd9 100644
--- a/lib/libalpm/hook.c
+++ b/lib/libalpm/hook.c
@@ -729,7 +729,7 @@ int _alpm_hook_run(alpm_handle_t *handle, alpm_hook_when_t when)
if(hooks_triggered != NULL) {
event.type = ALPM_EVENT_HOOK_START;
- EVENT(handle, &event);
+ EVENT(handle, (void *)&event);
hook_event.position = 1;
hook_event.total = triggered;
@@ -758,7 +758,7 @@ int _alpm_hook_run(alpm_handle_t *handle, alpm_hook_when_t when)
alpm_list_free(hooks_triggered);
event.type = ALPM_EVENT_HOOK_DONE;
- EVENT(handle, &event);
+ EVENT(handle, (void *)&event);
}
cleanup: