diff --git a/src/libvalent/clipboard/valent-clipboard.c b/src/libvalent/clipboard/valent-clipboard.c index 18f8b0263a..d70907be50 100644 --- a/src/libvalent/clipboard/valent-clipboard.c +++ b/src/libvalent/clipboard/valent-clipboard.c @@ -484,7 +484,7 @@ valent_clipboard_read_text (ValentClipboard *clipboard, if (mimetypes != NULL) { - for (unsigned int i = 0; i < G_N_ELEMENTS (text_mimetypes); i++) + for (size_t i = 0; i < G_N_ELEMENTS (text_mimetypes); i++) { const char *text_mimetype = text_mimetypes[i]; diff --git a/src/libvalent/device/valent-device-manager.c b/src/libvalent/device/valent-device-manager.c index d5a3c2b7da..bcda771058 100644 --- a/src/libvalent/device/valent-device-manager.c +++ b/src/libvalent/device/valent-device-manager.c @@ -796,7 +796,7 @@ valent_device_manager_shutdown (ValentApplicationPlugin *plugin) if (application != NULL) { - for (unsigned int i = 0; i < G_N_ELEMENTS (app_actions); i++) + for (size_t i = 0; i < G_N_ELEMENTS (app_actions); i++) g_action_map_remove_action (G_ACTION_MAP (application), app_actions[i].name); diff --git a/src/libvalent/ui/valent-menu-list.c b/src/libvalent/ui/valent-menu-list.c index a58e5d867e..73cd96ed67 100644 --- a/src/libvalent/ui/valent-menu-list.c +++ b/src/libvalent/ui/valent-menu-list.c @@ -71,7 +71,7 @@ on_key_pressed (GtkEventControllerKey *controller, g_assert (VALENT_IS_MENU_LIST (self)); - for (unsigned int i = 0; i < G_N_ELEMENTS (activate_keys); i++) + for (size_t i = 0; i < G_N_ELEMENTS (activate_keys); i++) { if (activate_keys[i] != keyval) continue; diff --git a/src/libvalent/ui/valent-ui-manager.c b/src/libvalent/ui/valent-ui-manager.c index d4b40b03c4..0bff196529 100644 --- a/src/libvalent/ui/valent-ui-manager.c +++ b/src/libvalent/ui/valent-ui-manager.c @@ -142,7 +142,7 @@ valent_ui_manager_shutdown (ValentApplicationPlugin *plugin) application = valent_extension_get_object (VALENT_EXTENSION (plugin)); - for (unsigned int i = 0; i < G_N_ELEMENTS (app_actions); i++) + for (size_t i = 0; i < G_N_ELEMENTS (app_actions); i++) g_action_map_remove_action (G_ACTION_MAP (application), app_actions[i].name); g_clear_pointer (&self->media_remote, gtk_window_destroy); diff --git a/src/plugins/mpris/valent-mpris-player.c b/src/plugins/mpris/valent-mpris-player.c index 25c53ddda3..5735a9c25a 100644 --- a/src/plugins/mpris/valent-mpris-player.c +++ b/src/plugins/mpris/valent-mpris-player.c @@ -99,7 +99,7 @@ on_player_properties_changed (GDBusProxy *proxy, g_object_freeze_notify (G_OBJECT (self)); g_variant_dict_init (&dict, changed_properties); - for (unsigned int i = 0; i < G_N_ELEMENTS (player_properties); i++) + for (size_t i = 0; i < G_N_ELEMENTS (player_properties); i++) { if (g_variant_dict_contains (&dict, player_properties[i].dbus)) { diff --git a/tests/plugins/battery/test-battery-plugin.c b/tests/plugins/battery/test-battery-plugin.c index eb1ee1cdb5..0fa2b42cb1 100644 --- a/tests/plugins/battery/test-battery-plugin.c +++ b/tests/plugins/battery/test-battery-plugin.c @@ -353,7 +353,7 @@ test_battery_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/clipboard/test-clipboard-plugin.c b/tests/plugins/clipboard/test-clipboard-plugin.c index 6b7ee46b5b..666d622450 100644 --- a/tests/plugins/clipboard/test-clipboard-plugin.c +++ b/tests/plugins/clipboard/test-clipboard-plugin.c @@ -201,7 +201,7 @@ test_clipboard_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/connectivity_report/test-connectivity_report-plugin.c b/tests/plugins/connectivity_report/test-connectivity_report-plugin.c index 1ca10dfbaf..06f4c4c1a0 100644 --- a/tests/plugins/connectivity_report/test-connectivity_report-plugin.c +++ b/tests/plugins/connectivity_report/test-connectivity_report-plugin.c @@ -381,7 +381,7 @@ test_connectivity_report_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } #endif diff --git a/tests/plugins/contacts/test-contacts-plugin.c b/tests/plugins/contacts/test-contacts-plugin.c index 81c8df3bea..8646910147 100644 --- a/tests/plugins/contacts/test-contacts-plugin.c +++ b/tests/plugins/contacts/test-contacts-plugin.c @@ -159,7 +159,7 @@ test_contacts_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/findmyphone/test-findmyphone-plugin.c b/tests/plugins/findmyphone/test-findmyphone-plugin.c index 342a94a037..b5a41a720c 100644 --- a/tests/plugins/findmyphone/test-findmyphone-plugin.c +++ b/tests/plugins/findmyphone/test-findmyphone-plugin.c @@ -68,7 +68,7 @@ test_findmyphone_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/lock/test-lock-plugin.c b/tests/plugins/lock/test-lock-plugin.c index edce429481..74ccb9c55a 100644 --- a/tests/plugins/lock/test-lock-plugin.c +++ b/tests/plugins/lock/test-lock-plugin.c @@ -124,7 +124,7 @@ test_lock_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/mousepad/test-mousepad-plugin.c b/tests/plugins/mousepad/test-mousepad-plugin.c index 6b7275b34c..537d1a91bf 100644 --- a/tests/plugins/mousepad/test-mousepad-plugin.c +++ b/tests/plugins/mousepad/test-mousepad-plugin.c @@ -330,7 +330,7 @@ test_mousepad_plugin_fuzz (ValentTestFixture *fixture, v_assert_packet_true (packet, "state"); json_node_unref (packet); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/mpris/test-mpris-plugin.c b/tests/plugins/mpris/test-mpris-plugin.c index 02e44f68e0..8f95bb1294 100644 --- a/tests/plugins/mpris/test-mpris-plugin.c +++ b/tests/plugins/mpris/test-mpris-plugin.c @@ -547,7 +547,7 @@ test_mpris_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/notification/test-notification-plugin.c b/tests/plugins/notification/test-notification-plugin.c index 4d72805ab0..0a2d60cf6e 100644 --- a/tests/plugins/notification/test-notification-plugin.c +++ b/tests/plugins/notification/test-notification-plugin.c @@ -318,7 +318,7 @@ test_notification_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/ping/test-ping-plugin.c b/tests/plugins/ping/test-ping-plugin.c index 085e7529ba..ba31a51de8 100644 --- a/tests/plugins/ping/test-ping-plugin.c +++ b/tests/plugins/ping/test-ping-plugin.c @@ -83,7 +83,7 @@ test_ping_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/presenter/test-presenter-plugin.c b/tests/plugins/presenter/test-presenter-plugin.c index 7bba62f9aa..a5fdf633c7 100644 --- a/tests/plugins/presenter/test-presenter-plugin.c +++ b/tests/plugins/presenter/test-presenter-plugin.c @@ -91,7 +91,7 @@ test_presenter_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/sftp/test-sftp-plugin.c b/tests/plugins/sftp/test-sftp-plugin.c index 756c9dc65c..10ec298f68 100644 --- a/tests/plugins/sftp/test-sftp-plugin.c +++ b/tests/plugins/sftp/test-sftp-plugin.c @@ -67,7 +67,7 @@ test_sftp_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/share/test-share-plugin.c b/tests/plugins/share/test-share-plugin.c index a2d34257af..0a5371c12c 100644 --- a/tests/plugins/share/test-share-plugin.c +++ b/tests/plugins/share/test-share-plugin.c @@ -25,7 +25,7 @@ static const char * const test_uris[] = { "resource:///tests/contact2.vcf", "resource:///tests/contact3.vcf", }; -static guint n_test_uris = G_N_ELEMENTS (test_uris); +static size_t n_test_uris = G_N_ELEMENTS (test_uris); static void @@ -323,7 +323,7 @@ test_share_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/share/test-share-upload.c b/tests/plugins/share/test-share-upload.c index a128ae759a..2a4cf3a591 100644 --- a/tests/plugins/share/test-share-upload.c +++ b/tests/plugins/share/test-share-upload.c @@ -15,7 +15,6 @@ static const char * const test_files[] = { "resource:///tests/contact2.vcf", "resource:///tests/contact3.vcf", }; -static guint n_test_files = G_N_ELEMENTS (test_files); static void @@ -48,7 +47,7 @@ on_items_changed (GListModel *model, g_assert_true (item_type == VALENT_TYPE_TRANSFER); g_assert_true (n_items == added); - g_assert_cmpint (added, ==, n_test_files); + g_assert_cmpint (added, ==, G_N_ELEMENTS (test_files)); } static void @@ -141,7 +140,7 @@ test_share_upload_multiple (ValentTestFixture *fixture, files = g_list_store_new (G_TYPE_FILE); transfer = valent_share_upload_new (fixture->device); - for (unsigned int i = 0; i < n_test_files; i++) + for (size_t i = 0; i < G_N_ELEMENTS (test_files); i++) { g_autoptr (GFile) file = NULL; g_autoptr (GFileInfo) info = NULL; @@ -176,18 +175,18 @@ test_share_upload_multiple (ValentTestFixture *fixture, packet = valent_test_fixture_expect_packet (fixture); v_assert_packet_type (packet, "kdeconnect.share.request.update"); - v_assert_packet_cmpint (packet, "numberOfFiles", ==, n_test_files); + v_assert_packet_cmpint (packet, "numberOfFiles", ==, G_N_ELEMENTS (test_files)); v_assert_packet_cmpint (packet, "totalPayloadSize", ==, total_size); json_node_unref (packet); - for (unsigned int i = 0; i < n_test_files; i++) + for (size_t i = 0; i < G_N_ELEMENTS (test_files); i++) { packet = valent_test_fixture_expect_packet (fixture); v_assert_packet_type (packet, "kdeconnect.share.request"); v_assert_packet_cmpstr (packet, "filename", ==, file_name[i]); v_assert_packet_field (packet, "creationTime"); v_assert_packet_field (packet, "lastModified"); - v_assert_packet_cmpint (packet, "numberOfFiles", ==, n_test_files); + v_assert_packet_cmpint (packet, "numberOfFiles", ==, G_N_ELEMENTS (test_files)); v_assert_packet_cmpint (packet, "totalPayloadSize", ==, total_size); g_assert_cmpint (valent_packet_get_payload_size (packet), ==, file_size[i]); diff --git a/tests/plugins/sms/test-sms-plugin.c b/tests/plugins/sms/test-sms-plugin.c index 1ac46d9311..8e905df6a9 100644 --- a/tests/plugins/sms/test-sms-plugin.c +++ b/tests/plugins/sms/test-sms-plugin.c @@ -94,7 +94,7 @@ test_sms_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); } diff --git a/tests/plugins/sms/test-sms-utils.c b/tests/plugins/sms/test-sms-utils.c index b2b0c59949..ea5ad510e9 100644 --- a/tests/plugins/sms/test-sms-utils.c +++ b/tests/plugins/sms/test-sms-utils.c @@ -108,7 +108,7 @@ test_sms_phone_number (void) VALENT_TEST_CHECK ("Functions `valent_phone_number_normalize()` and " "`valent_phone_number_equal()` can handle a variety of " "phone number formats"); - for (unsigned int i = 0; i < G_N_ELEMENTS (numbers); i++) + for (size_t i = 0; i < G_N_ELEMENTS (numbers); i++) { gboolean equal; diff --git a/tests/plugins/telephony/test-telephony-plugin.c b/tests/plugins/telephony/test-telephony-plugin.c index 54294c320b..dd5bc0608b 100644 --- a/tests/plugins/telephony/test-telephony-plugin.c +++ b/tests/plugins/telephony/test-telephony-plugin.c @@ -246,7 +246,7 @@ test_telephony_plugin_fuzz (ValentTestFixture *fixture, valent_test_fixture_connect (fixture, TRUE); g_test_log_set_fatal_handler (valent_test_mute_fuzzing, NULL); - for (unsigned int s = 0; s < G_N_ELEMENTS (schemas); s++) + for (size_t s = 0; s < G_N_ELEMENTS (schemas); s++) valent_test_fixture_schema_fuzz (fixture, schemas[s]); }