Skip to content
Snippets Groups Projects
Commit ecfcc96c authored by Emanuele Aina's avatar Emanuele Aina
Browse files

test-routing-request: Use the right unref function


Use `g_ptr_array_unref()` instead of `g_array_unref()` on `GPtrArray`
instances. This got caught by the new GCC 8 warnings.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 18d4151e
No related branches found
No related tags found
1 merge request!4Fix -Werror failures and release 0.2019pre.0/0.2019pre.0-0co1
......@@ -296,7 +296,7 @@ test_builder (void)
parameters = trp_routing_request_get_parameters (request);
g_assert_cmpint (parameters->len, ==, 0);
g_clear_pointer (&parameters, g_array_unref);
g_clear_pointer (&parameters, g_ptr_array_unref);
parameters = trp_routing_request_get_points (request);
g_assert_cmpint (parameters->len, ==, 1);
......@@ -305,7 +305,7 @@ test_builder (void)
place = trp_routing_parameter_get_place (parameter);
g_assert_true (place == norwich);
g_clear_object (&place);
g_clear_pointer (&parameters, g_array_unref);
g_clear_pointer (&parameters, g_ptr_array_unref);
g_clear_object (&request);
......@@ -371,7 +371,7 @@ test_builder (void)
g_assert_true (place == norwich);
g_clear_object (&place);
g_clear_pointer (&parameters, g_array_unref);
g_clear_pointer (&parameters, g_ptr_array_unref);
parameters = trp_routing_request_get_parameters (request);
g_assert_cmpint (parameters->len, ==, 7);
......@@ -416,7 +416,7 @@ test_builder (void)
g_assert_true (place == norwich);
g_clear_object (&place);
g_clear_pointer (&parameters, g_array_unref);
g_clear_pointer (&parameters, g_ptr_array_unref);
notes = trp_routing_request_get_parameter_values (request, "X-MY-NOTE");
g_assert_nonnull (notes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment