diff --git a/src/matrix-http-api.c b/src/matrix-http-api.c index 24b3e46..5eefe1a 100644 --- a/src/matrix-http-api.c +++ b/src/matrix-http-api.c @@ -161,7 +161,6 @@ matrix_http_api_set_property(GObject *gobject, GParamSpec *pspec) { MatrixHTTPAPI *api = MATRIX_HTTP_API(gobject); - MatrixHTTPAPIPrivate *priv = matrix_http_api_get_instance_private(api); switch (prop_id) { case PROP_VALIDATE_CERTIFICATE: @@ -807,7 +806,7 @@ _send(MatrixHTTPAPI *api, json_generator_set_root(generator, (JsonNode *)json_content); data = json_generator_to_data(generator, &datalen); } else if (raw_content) { - data = raw_content->data; + data = (gchar *)raw_content->data; datalen = raw_content->len; } else { data = g_strdup("{}"); @@ -915,7 +914,6 @@ i_create_room(MatrixAPI *api, GError **error) { JsonNode *body; - JsonObject *root_object; JsonBuilder *builder; builder = json_builder_new(); @@ -1247,6 +1245,9 @@ i_media_thumbnail(MatrixAPI *api, g_hash_table_replace(params, "method", g_strdup("scale")); break; + + // This is here to prevent compiler warnings + case MATRIX_RESIZE_METHOD_DEFAULT: break; } } @@ -1330,11 +1331,9 @@ i_set_user_presence(MatrixAPI *api, GError **error) { gchar *encoded_user_id; - gchar *path, *presence_string, *a; + gchar *path, *presence_string; JsonBuilder *builder; JsonNode *body; - GEnumClass *presence_class; - GEnumValue *value; encoded_user_id = soup_uri_encode(user_id, NULL); path = g_strdup_printf("presence/%s/status", encoded_user_id); @@ -1742,7 +1741,6 @@ i_invite_user_3rdparty(MatrixAPI *api, GError **error) { gchar *encoded_room_id, *path; - JsonBuilder *builder; JsonNode *body; encoded_room_id = soup_uri_encode(room_id, NULL); diff --git a/src/matrix-http-client.c b/src/matrix-http-client.c index ad7f6a0..510860e 100644 --- a/src/matrix-http-client.c +++ b/src/matrix-http-client.c @@ -45,14 +45,6 @@ typedef struct _MatrixHTTPClientPrivate { guint event_timeout; } MatrixHTTPClientPrivate; -enum { - PROP_BASE_URL = 1, - PROP_VALIDATE_CERTIFICATE, - N_PROPERTIES -}; - -static GParamSpec *obj_properties[N_PROPERTIES] = {NULL,}; - static void matrix_http_client_matrix_client_init(MatrixClientInterface *iface); static void i_begin_polling(MatrixClient *client, GError **error); diff --git a/src/matrix-types.c b/src/matrix-types.c index 6a8ab99..ed2e14c 100644 --- a/src/matrix-types.c +++ b/src/matrix-types.c @@ -400,8 +400,8 @@ matrix_filter_rules_delete_sender(MatrixFilterRules *rules, const gchar *sender) g_return_if_fail(sender != NULL); - while (sender_element = g_list_find_custom(rules->senders, sender, - (GCompareFunc)g_strcmp0)) { + while ((sender_element = g_list_find_custom(rules->senders, sender, + (GCompareFunc)g_strcmp0))) { rules->senders = g_list_remove_link(rules->senders, sender_element); g_list_free_full(sender_element, g_free); } @@ -490,8 +490,8 @@ matrix_filter_rules_delete_excluded_sender(MatrixFilterRules *rules, g_return_if_fail(sender != NULL); - while (sender_element = g_list_find_custom(rules->excluded_senders, sender, - (GCompareFunc)g_strcmp0)) { + while ((sender_element = g_list_find_custom(rules->excluded_senders, sender, + (GCompareFunc)g_strcmp0))) { rules->excluded_senders = g_list_remove_link(rules->excluded_senders, sender_element); g_list_free_full(sender_element, g_free); @@ -571,8 +571,8 @@ matrix_filter_rules_delete_room(MatrixFilterRules *rules, const gchar *room) g_return_if_fail(room != NULL); - while (room_element = g_list_find_custom(rules->rooms, room, - (GCompareFunc)g_strcmp0)) { + while ((room_element = g_list_find_custom(rules->rooms, room, + (GCompareFunc)g_strcmp0))) { rules->rooms = g_list_remove_link(rules->rooms, room_element); g_list_free_full(room_element, g_free); } @@ -657,8 +657,8 @@ matrix_filter_rules_delete_excluded_room(MatrixFilterRules *rules, g_return_if_fail(room != NULL); - while (room_element = g_list_find_custom(rules->excluded_rooms, room, - (GCompareFunc)g_strcmp0)) { + while ((room_element = g_list_find_custom(rules->excluded_rooms, room, + (GCompareFunc)g_strcmp0))) { rules->excluded_rooms = g_list_remove_link(rules->excluded_rooms, room_element); g_list_free_full(room_element, g_free); @@ -738,8 +738,8 @@ matrix_filter_rules_delete_type(MatrixFilterRules *rules, g_return_if_fail(event_type != NULL); - while (type_element = g_list_find_custom(rules->types, event_type, - (GCompareFunc)g_strcmp0)) { + while ((type_element = g_list_find_custom(rules->types, event_type, + (GCompareFunc)g_strcmp0))) { rules->types = g_list_remove_link(rules->types, type_element); g_list_free_full(type_element, g_free); } @@ -823,8 +823,8 @@ matrix_filter_rules_delete_excluded_type(MatrixFilterRules *rules, g_return_if_fail(event_type != NULL); - while (type_element = g_list_find_custom(rules->excluded_types, event_type, - (GCompareFunc)g_strcmp0)) { + while ((type_element = g_list_find_custom(rules->excluded_types, event_type, + (GCompareFunc)g_strcmp0))) { rules->excluded_types = g_list_remove_link(rules->excluded_types, type_element); g_list_free_full(type_element, g_free); @@ -1389,9 +1389,9 @@ matrix_filter_delete_event_field(MatrixFilter *filter, const gchar *event_field) g_return_if_fail(event_field != NULL); - while (event_field_element = g_list_find_custom(filter->event_fields, - event_field, - (GCompareFunc)g_strcmp0)) { + while ((event_field_element = g_list_find_custom(filter->event_fields, + event_field, + (GCompareFunc)g_strcmp0))) { filter->event_fields = g_list_remove_link(filter->event_fields, event_field_element); g_list_free_full(event_field_element, g_free); diff --git a/src/test-api-client.c b/src/test-api-client.c index 913f152..caa39da 100644 --- a/src/test-api-client.c +++ b/src/test-api-client.c @@ -155,7 +155,6 @@ int main(int argc, char *argv[]) { MatrixAPI *api; - GHashTable *params; GMainLoop *loop = g_main_loop_new(NULL, FALSE); GOptionContext *opts; GError *err = NULL;