GNOME Bugzilla – Bug 786463
gio-tool-save: Prevent overwriting error
Last modified: 2017-08-18 12:47:37 UTC
The following warning is shown, when both g_output_stream_write and g_output_stream_close fail: "GError set over the top of a previous GError or uninitialized memory." Let's clear the error after use.
Created attachment 357886 [details] [review] gio-tool-save: Prevent overwriting error
Created attachment 357887 [details] [review] gio-tool: Use print_file_error correctly Use print_file_error where an error relates to that file and vice versa.
Review of attachment 357886 [details] [review]: This is correct, modulo an indentation problem. Please push it to master once you’ve fixed that. ::: gio/gio-tool-save.c @@ +111,3 @@ save_res = FALSE; print_error ("%s", error->message); + g_clear_error (error); Nitpick: Indentation problem.
Review of attachment 357887 [details] [review]: Looks good.
Created attachment 357892 [details] [review] gio-tool-save: Prevent overwriting error Fix indentation.
Created attachment 357894 [details] [review] gio-tool: Use print_file_error correctly Remove unrelated whitespace change.
Attachment 357892 [details] pushed as c7f2a7e - gio-tool-save: Prevent overwriting error Attachment 357894 [details] pushed as 087525b - gio-tool: Use print_file_error correctly