[epiphany/mcatanzaro/more-scan-build: 2/3] web-process-extension: teach scan-build to ignore certain dead stores
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/more-scan-build: 2/3] web-process-extension: teach scan-build to ignore certain dead stores
- Date: Fri, 27 Dec 2019 17:27:44 +0000 (UTC)
commit ce0221c02cda03dc8b8d75e98b90efd6e51848c4
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Dec 27 11:24:06 2019 -0600
web-process-extension: teach scan-build to ignore certain dead stores
These are not *actually* dead stores because we need to free the return
values. But because we use g_autoptr to do so, scan-build isn't smart
enough to avoid warning about it.
.../ephy-web-overview-model.c | 6 +--
.../ephy-web-process-extension.c | 48 +++++++++++-----------
2 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/embed/web-process-extension/ephy-web-overview-model.c
b/embed/web-process-extension/ephy-web-overview-model.c
index b59756167..6b6c0dc0c 100644
--- a/embed/web-process-extension/ephy-web-overview-model.c
+++ b/embed/web-process-extension/ephy-web-overview-model.c
@@ -130,7 +130,7 @@ ephy_web_overview_model_notify_urls_changed (EphyWebOverviewModel *model)
if (value && jsc_value_is_function (value)) {
if (!urls)
urls = ephy_web_overview_model_urls_to_js_value (model, jsc_value_get_context (value));
- ret = jsc_value_function_call (value, G_TYPE_PTR_ARRAY, urls, G_TYPE_NONE);
+ (void)ret = jsc_value_function_call (value, G_TYPE_PTR_ARRAY, urls, G_TYPE_NONE);
}
}
}
@@ -151,7 +151,7 @@ ephy_web_overview_model_notify_thumbnail_changed (EphyWebOverviewModel *model,
value = jsc_weak_value_get_value (JSC_WEAK_VALUE (key));
if (value) {
if (jsc_value_is_function (value))
- ret = jsc_value_function_call (value, G_TYPE_STRING, url, G_TYPE_STRING, path, G_TYPE_NONE);
+ (void)ret = jsc_value_function_call (value, G_TYPE_STRING, url, G_TYPE_STRING, path, G_TYPE_NONE);
}
}
}
@@ -172,7 +172,7 @@ ephy_web_overview_model_notify_title_changed (EphyWebOverviewModel *model,
value = jsc_weak_value_get_value (JSC_WEAK_VALUE (key));
if (value) {
if (jsc_value_is_function (value))
- ret = jsc_value_function_call (value, G_TYPE_STRING, url, G_TYPE_STRING, title, G_TYPE_NONE);
+ (void)ret = jsc_value_function_call (value, G_TYPE_STRING, url, G_TYPE_STRING, title, G_TYPE_NONE);
}
}
}
diff --git a/embed/web-process-extension/ephy-web-process-extension.c
b/embed/web-process-extension/ephy-web-process-extension.c
index 9fafbd4bb..b1e49a0b3 100644
--- a/embed/web-process-extension/ephy-web-process-extension.c
+++ b/embed/web-process-extension/ephy-web-process-extension.c
@@ -109,12 +109,12 @@ web_page_will_submit_form (WebKitWebPage *web_page,
js_context = webkit_frame_get_js_context_for_script_world (source_frame, extension->script_world);
js_ephy = jsc_context_get_value (js_context, "Ephy");
js_form = webkit_frame_get_js_value_for_dom_object_in_script_world (source_frame, WEBKIT_DOM_OBJECT
(dom_form), extension->script_world);
- js_result = jsc_value_object_invoke_method (js_ephy,
- "handleFormSubmission",
- G_TYPE_UINT64, webkit_web_page_get_id (web_page),
- G_TYPE_UINT64, webkit_frame_get_id (source_frame),
- JSC_TYPE_VALUE, js_form,
- G_TYPE_NONE);
+ (void)js_result = jsc_value_object_invoke_method (js_ephy,
+ "handleFormSubmission",
+ G_TYPE_UINT64, webkit_web_page_get_id (web_page),
+ G_TYPE_UINT64, webkit_frame_get_id (source_frame),
+ JSC_TYPE_VALUE, js_form,
+ G_TYPE_NONE);
}
static char *
@@ -182,13 +182,13 @@ web_page_form_controls_associated (WebKitWebPage *web_page,
G_CALLBACK (password_form_message_serializer), NULL, NULL,
G_TYPE_STRING, 2,
G_TYPE_UINT64, G_TYPE_BOOLEAN);
- js_result = jsc_value_object_invoke_method (js_ephy,
- "formControlsAssociated",
- G_TYPE_UINT64, webkit_web_page_get_id (web_page),
- G_TYPE_UINT64, webkit_frame_get_id (frame),
- G_TYPE_PTR_ARRAY, form_controls,
- JSC_TYPE_VALUE, js_serializer,
- G_TYPE_NONE);
+ (void)js_result = jsc_value_object_invoke_method (js_ephy,
+ "formControlsAssociated",
+ G_TYPE_UINT64, webkit_web_page_get_id (web_page),
+ G_TYPE_UINT64, webkit_frame_get_id (frame),
+ G_TYPE_PTR_ARRAY, form_controls,
+ JSC_TYPE_VALUE, js_serializer,
+ G_TYPE_NONE);
frame_id = webkit_frame_get_id (frame);
if (!g_hash_table_contains (extension->frames_map, &frame_id)) {
@@ -241,7 +241,7 @@ ephy_web_process_extension_page_created_cb (EphyWebProcessExtension *extension,
g_autoptr (JSCContext) js_context = NULL;
/* Enforce the creation of the script world global context in the main frame */
- js_context = webkit_frame_get_js_context_for_script_world (webkit_web_page_get_main_frame (web_page),
extension->script_world);
+ (void)js_context = webkit_frame_get_js_context_for_script_world (webkit_web_page_get_main_frame
(web_page), extension->script_world);
g_signal_connect (web_page, "send-request",
G_CALLBACK (web_page_send_request),
@@ -488,10 +488,10 @@ web_view_query_usernames_ready_cb (WebKitWebPage *web_page,
if (password_manager) {
g_autoptr (JSCValue) ret = NULL;
- ret = jsc_value_object_invoke_method (password_manager, "_onQueryUsernamesResponse",
- G_TYPE_STRV, usernames,
- G_TYPE_UINT64, data->promise_id,
- G_TYPE_NONE);
+ (void)ret = jsc_value_object_invoke_method (password_manager, "_onQueryUsernamesResponse",
+ G_TYPE_STRV, usernames,
+ G_TYPE_UINT64, data->promise_id,
+ G_TYPE_NONE);
}
g_free (usernames);
@@ -559,11 +559,11 @@ web_view_query_password_ready_cb (WebKitWebPage *web_page,
if (password_manager) {
g_autoptr (JSCValue) ret = NULL;
- ret = jsc_value_object_invoke_method (password_manager, "_onQueryResponse",
- G_TYPE_STRING, username,
- G_TYPE_STRING, password,
- G_TYPE_UINT64, data->promise_id,
- G_TYPE_NONE);
+ (void)ret = jsc_value_object_invoke_method (password_manager, "_onQueryResponse",
+ G_TYPE_STRING, username,
+ G_TYPE_STRING, password,
+ G_TYPE_UINT64, data->promise_id,
+ G_TYPE_NONE);
}
g_free (data);
@@ -637,7 +637,7 @@ js_exception_handler (JSCContext *context,
g_autofree char *report = NULL;
js_console = jsc_context_get_value (context, "console");
- js_result = jsc_value_object_invoke_method (js_console, "error", JSC_TYPE_EXCEPTION, exception,
G_TYPE_NONE);
+ (void)js_result = jsc_value_object_invoke_method (js_console, "error", JSC_TYPE_EXCEPTION, exception,
G_TYPE_NONE);
report = jsc_exception_report (exception);
g_warning ("%s", report);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]