diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2015-04-14 15:48:35 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-04-16 13:23:31 +0200 |
commit | d7c099fa532246cf8812ebf250b97026f0bbee7d (patch) | |
tree | c906b4c1f32d87ad826f9d6c66d3897470879c48 /unit | |
parent | 75eaabf09f1007c68611f06637125cc87e41a701 (diff) | |
download | bluez-d7c099fa532246cf8812ebf250b97026f0bbee7d.tar.gz |
android/avrcp-lib: Use void pointer in register_notification
In this callback params vary depending on code. Passing those as void*
allows to avoid extra memcpy that would be otherwise needed to
avoid warnings due to increased alignment when casting.
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-avrcp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/unit/test-avrcp.c b/unit/test-avrcp.c index a610ad5d7..01307e679 100644 --- a/unit/test-avrcp.c +++ b/unit/test-avrcp.c @@ -826,22 +826,23 @@ static void set_volume_rsp(struct avrcp *session, int err, uint8_t volume, static bool register_notification_rsp(struct avrcp *session, int err, uint8_t code, uint8_t event, - uint8_t *params, void *user_data) + void *params, void *user_data) { struct context *context = user_data; + uint8_t *p = params; g_assert_cmpint(err, ==, 0); switch (event) { case AVRCP_EVENT_VOLUME_CHANGED: if (g_str_equal(context->data->test_name, "/TP/VLH/BV-03-C")) { - g_assert_cmpint(params[0], ==, 0); + g_assert_cmpint(p[0], ==, 0); break; } else if (code == AVC_CTYPE_INTERIM) { - g_assert_cmpint(params[0], ==, 0); + g_assert_cmpint(p[0], ==, 0); return true; } - g_assert_cmpint(params[0], ==, 1); + g_assert_cmpint(p[0], ==, 1); break; } |