Skip to content

Commit

Permalink
Cast void * to int first before we can it to enum. This is
Browse files Browse the repository at this point in the history
to fix the build on clang-11.
  • Loading branch information
sobomax committed Oct 24, 2022
1 parent b5819d5 commit 04b2131
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/carrierroute/route_func.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ int cr_do_route(struct sip_msg * _msg, void *_carrier,
goto unlock_and_out;
}

if (rewrite_uri_recursor(rt->tree, prefix_matching, flags, &dest, _msg, rewrite_user, (enum hash_source)_hsrc, _halg, _dstavp) != 0) {
if (rewrite_uri_recursor(rt->tree, prefix_matching, flags, &dest, _msg, rewrite_user, (enum hash_source)(intptr_t)_hsrc, _halg, _dstavp) != 0) {
/* this is not necessarily an error, rewrite_recursor does already some error logging */
LM_INFO("rewrite_uri_recursor doesn't complete, uri %.*s, carrier %d, domain %d\n", prefix_matching->len,
prefix_matching->s, carrier_id, domain_id);
Expand Down
3 changes: 2 additions & 1 deletion modules/drouting/dr_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/


#include <stdint.h>
#include <stdlib.h>
#include "../../dprint.h"
#include "../../mem/mem.h"
Expand Down Expand Up @@ -110,7 +111,7 @@ int insert_drcb(struct dr_head_cbl **dr_cb_list, struct dr_callback *cb,
int register_dr_cb(enum drcb_types type, dr_cb f, void *param,
dr_param_free_cb ff)
{
sort_cb_type alg = (sort_cb_type)param;
sort_cb_type alg = (sort_cb_type)(intptr_t)param;
struct dr_callback *cb;

cb = pkg_malloc(sizeof *cb);
Expand Down

0 comments on commit 04b2131

Please sign in to comment.