diff options
author | Michael Catanzaro <mcatanzaro@redhat.com> | 2023-01-21 15:50:24 -0600 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-01-31 08:00:31 +0000 |
commit | 7ae7d069a6d19b644c54350879aa8cadf2622df3 (patch) | |
tree | 771fc309061b0db918b2f4b1e285f2bc9306154c | |
parent | 9bd323597867b1c42fe3307f653a3c7ebd6cc080 (diff) | |
download | epiphany-7ae7d069a6d19b644c54350879aa8cadf2622df3.tar.gz |
Remove unused variables
Apparently GCC isn't smart enough to warn about unused variables when
autoptrs/autofrees are used. But clang is.
Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1267>
-rw-r--r-- | embed/ephy-about-handler.c | 1 | ||||
-rw-r--r-- | embed/web-process-extension/ephy-web-process-extension.c | 1 | ||||
-rw-r--r-- | embed/web-process-extension/ephy-webextension-api.c | 2 | ||||
-rw-r--r-- | embed/web-process-extension/ephy-webextension-common.c | 3 | ||||
-rw-r--r-- | src/ephy-suggestion-model.c | 1 | ||||
-rw-r--r-- | src/profile-migrator/ephy-profile-migrator.c | 1 | ||||
-rw-r--r-- | src/webextension/api/alarms.c | 1 | ||||
-rw-r--r-- | src/webextension/api/commands.c | 5 | ||||
-rw-r--r-- | src/webextension/ephy-web-extension-manager.c | 1 | ||||
-rw-r--r-- | src/window-commands.c | 1 |
10 files changed, 2 insertions, 15 deletions
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c index 45f86bdae..2008f3831 100644 --- a/embed/ephy-about-handler.c +++ b/embed/ephy-about-handler.c @@ -278,7 +278,6 @@ handle_applications_finished_cb (EphyAboutHandler *handler, g_autofree char *encoded_icon_path = NULL; g_autofree char *encoded_name = NULL; g_autofree char *encoded_url = NULL; - g_autofree char *js_encoded_id = NULL; g_autoptr (GDate) date = NULL; char install_date[128]; diff --git a/embed/web-process-extension/ephy-web-process-extension.c b/embed/web-process-extension/ephy-web-process-extension.c index f14ba694b..a3a911662 100644 --- a/embed/web-process-extension/ephy-web-process-extension.c +++ b/embed/web-process-extension/ephy-web-process-extension.c @@ -281,7 +281,6 @@ ephy_web_process_extension_page_created_cb (EphyWebProcessExtension *extension, WebKitWebPage *web_page) { WebKitWebFormManager *form_manager; - g_autoptr (JSCContext) js_context = NULL; g_signal_connect (web_page, "context-menu", G_CALLBACK (web_page_context_menu), diff --git a/embed/web-process-extension/ephy-webextension-api.c b/embed/web-process-extension/ephy-webextension-api.c index 9cd37bf88..4c3704771 100644 --- a/embed/web-process-extension/ephy-webextension-api.c +++ b/embed/web-process-extension/ephy-webextension-api.c @@ -72,7 +72,6 @@ ephy_web_extension_page_user_message_received_cb (WebKitWebPage *page, } else if (strcmp (name, "sendMessage") == 0) { GVariant *parameters; const char *script; - g_autofree char *uri = NULL; JSCContext *context = webkit_frame_get_js_context (frame); parameters = webkit_user_message_get_parameters (message); @@ -172,7 +171,6 @@ window_object_cleared_cb (WebKitScriptWorld *world, { g_autoptr (JSCContext) js_context = NULL; g_autoptr (JSCValue) js_browser = NULL; - g_autoptr (JSCValue) js_i18n = NULL; g_autoptr (JSCValue) js_extension = NULL; g_autoptr (JSCValue) js_function = NULL; g_autoptr (GBytes) bytes = NULL; diff --git a/embed/web-process-extension/ephy-webextension-common.c b/embed/web-process-extension/ephy-webextension-common.c index 41d36df39..4440428f8 100644 --- a/embed/web-process-extension/ephy-webextension-common.c +++ b/embed/web-process-extension/ephy-webextension-common.c @@ -101,6 +101,7 @@ ephy_send_message (const char *function_name, if (!jsc_value_is_array (function_args) || !jsc_value_is_function (resolve_callback)) { g_autoptr (JSCValue) ret = jsc_value_function_call (reject_callback, G_TYPE_STRING, "ephy_send_message(): Invalid Arguments", G_TYPE_NONE); + (void)ret; return; } @@ -180,12 +181,10 @@ ephy_webextension_install_common_apis (WebKitWebPage *page, const char *guid, JsonObject *translations) { - g_autoptr (JSCValue) result = NULL; g_autoptr (JSCValue) js_browser = NULL; g_autoptr (JSCValue) js_i18n = NULL; g_autoptr (JSCValue) js_extension = NULL; g_autoptr (JSCValue) js_function = NULL; - g_autoptr (JSCValue) js_object = NULL; EphySendMessageData *send_message_data; jsc_context_push_exception_handler (js_context, (JSCExceptionHandler)js_exception_handler, NULL, NULL); diff --git a/src/ephy-suggestion-model.c b/src/ephy-suggestion-model.c index a3722b158..c6d421786 100644 --- a/src/ephy-suggestion-model.c +++ b/src/ephy-suggestion-model.c @@ -558,7 +558,6 @@ bookmarks_query (EphySuggestionModel *self, QueryData *data, GTask *task) { - g_autoptr (GList) new_urls = NULL; GSequence *bookmarks; bookmarks = ephy_bookmarks_manager_get_bookmarks (self->bookmarks_manager); diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c index 6fa426a43..5e723c078 100644 --- a/src/profile-migrator/ephy-profile-migrator.c +++ b/src/profile-migrator/ephy-profile-migrator.c @@ -1555,7 +1555,6 @@ migrate_pre_flatpak_webapps (void) g_autoptr (GKeyFile) keyfile = NULL; g_autoptr (GFile) app_link_file = NULL; g_autoptr (GFile) old_desktop_file = NULL; - g_autoptr (GFileInfo) file_info = NULL; const char *final_hyphen, *checksum; g_autofree char *new_name = NULL; diff --git a/src/webextension/api/alarms.c b/src/webextension/api/alarms.c index 0ff26d737..3c0d59374 100644 --- a/src/webextension/api/alarms.c +++ b/src/webextension/api/alarms.c @@ -166,7 +166,6 @@ alarms_handler_create (EphyWebExtensionSender *sender, double delay_in_minutes = 0.0; double period_in_minutes = 0.0; double when = 0.0; - g_autofree char *name_str = NULL; /* This takes two optional args, name:str, info:obj */ name = ephy_json_array_get_string (args, 0); diff --git a/src/webextension/api/commands.c b/src/webextension/api/commands.c index 8f4c3218b..086079a45 100644 --- a/src/webextension/api/commands.c +++ b/src/webextension/api/commands.c @@ -113,7 +113,6 @@ setup_action (EphyWebExtension *self, WebExtensionCommand *command) { g_autofree char *action_name = get_action_name (self, command); - g_autofree char *accel_action_name = get_accel_action_name (self, command); g_autoptr (GSimpleAction) action = g_simple_action_new (action_name, NULL); g_action_map_add_action (G_ACTION_MAP (ephy_shell_get_default ()), G_ACTION (action)); @@ -176,10 +175,6 @@ commands_handler_reset (EphyWebExtensionSender *sender, const char *name = ephy_json_array_get_string (args, 0); WebExtensionCommand *command; WebExtensionCommand *default_command; - g_autofree char *action_name = NULL; - g_autofree char *shortcut = NULL; - g_autofree char *suggested_key = NULL; - g_autofree char *description = NULL; if (!name) { g_task_return_new_error (task, WEB_EXTENSION_ERROR, WEB_EXTENSION_ERROR_INVALID_ARGUMENT, "commands.reset(): Missing name argument"); diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c index f0f0f8afe..0ee7324af 100644 --- a/src/webextension/ephy-web-extension-manager.c +++ b/src/webextension/ephy-web-extension-manager.c @@ -870,6 +870,7 @@ send_to_page_ready_cb (WebKitWebView *web_view, EphyWebExtension *web_extension) { g_autoptr (WebKitUserMessage) response = webkit_web_view_send_message_to_page_finish (web_view, result, NULL); + (void)response; update_translations (web_extension); add_content_scripts (web_extension, EPHY_WEB_VIEW (web_view)); diff --git a/src/window-commands.c b/src/window-commands.c index a1bcb189b..dfd965563 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -1816,7 +1816,6 @@ fill_mobile_capable_cb (GObject *source, static void save_as_application_proceed (EphyApplicationDialogData *data) { - g_autofree gchar *desktop_file_id = NULL; g_autofree char *message = NULL; GNotification *notification; gboolean success; |