From b57f335c5008ba3cad74cc8c68be2952266d96cf Mon Sep 17 00:00:00 2001 From: Arman Uguray Date: Mon, 4 May 2015 16:28:11 -0700 Subject: [PATCH] plugins/policy: Fix clang compile error This patch fixes the following error when bluez is compiled with clang: plugins/policy.c:780:6: error: cast from 'int *' to 'size_t *' (aka 'unsigned long *') increases required alignment from 4 to 8 [-Werror,-Wcast-align] (size_t *) &reconnect_intervals_len, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- plugins/policy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/policy.c b/plugins/policy.c index 809868914..7687203e7 100644 --- a/plugins/policy.c +++ b/plugins/policy.c @@ -61,19 +61,19 @@ struct reconnect_data { GSList *services; guint timer; bool active; - int attempt; + unsigned int attempt; }; static const char *default_reconnect[] = { HSP_AG_UUID, HFP_AG_UUID, A2DP_SOURCE_UUID, NULL }; static char **reconnect_uuids = NULL; -static const int default_attempts = 7; -static int reconnect_attempts = 0; +static const size_t default_attempts = 7; +static size_t reconnect_attempts = 0; static const int default_intervals[] = { 1, 2, 4, 8, 16, 32, 64 }; static int *reconnect_intervals = NULL; -static int reconnect_intervals_len = 0; +static size_t reconnect_intervals_len = 0; static GSList *reconnects = NULL; -- 2.47.3