mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
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>
This commit is contained in:
parent
ab50864a75
commit
8d9890d3f4
@ -729,7 +729,7 @@ int _alpm_hook_run(alpm_handle_t *handle, alpm_hook_when_t when)
|
|||||||
|
|
||||||
if(hooks_triggered != NULL) {
|
if(hooks_triggered != NULL) {
|
||||||
event.type = ALPM_EVENT_HOOK_START;
|
event.type = ALPM_EVENT_HOOK_START;
|
||||||
EVENT(handle, &event);
|
EVENT(handle, (void *)&event);
|
||||||
|
|
||||||
hook_event.position = 1;
|
hook_event.position = 1;
|
||||||
hook_event.total = triggered;
|
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);
|
alpm_list_free(hooks_triggered);
|
||||||
|
|
||||||
event.type = ALPM_EVENT_HOOK_DONE;
|
event.type = ALPM_EVENT_HOOK_DONE;
|
||||||
EVENT(handle, &event);
|
EVENT(handle, (void *)&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
@ -199,7 +199,7 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
|
|
||||||
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction started\n");
|
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction started\n");
|
||||||
event.type = ALPM_EVENT_TRANSACTION_START;
|
event.type = ALPM_EVENT_TRANSACTION_START;
|
||||||
EVENT(handle, &event);
|
EVENT(handle, (void *)&event);
|
||||||
|
|
||||||
if(trans->add == NULL) {
|
if(trans->add == NULL) {
|
||||||
if(_alpm_remove_packages(handle, 1) == -1) {
|
if(_alpm_remove_packages(handle, 1) == -1) {
|
||||||
@ -223,7 +223,7 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction interrupted\n");
|
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction interrupted\n");
|
||||||
} else {
|
} else {
|
||||||
event.type = ALPM_EVENT_TRANSACTION_DONE;
|
event.type = ALPM_EVENT_TRANSACTION_DONE;
|
||||||
EVENT(handle, &event);
|
EVENT(handle, (void *)&event);
|
||||||
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction completed\n");
|
alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction completed\n");
|
||||||
_alpm_hook_run(handle, ALPM_HOOK_POST_TRANSACTION);
|
_alpm_hook_run(handle, ALPM_HOOK_POST_TRANSACTION);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user