diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-06-24 20:41:55 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-06-24 20:41:55 (GMT) |
commit | a2c5f23381d2aa06e5455c8e377d3d90db6d9a6c (patch) | |
tree | 0dd96ee8858764e14e784022fc9628945bb3c112 /src | |
parent | d614d4b09230411455ed07aac289025a55633da8 (diff) |
Prevented GCC to warn about an impossible case.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -287,12 +287,22 @@ int main(int argc, char **argv) if (editor == NULL) goto failed_to_load_editor; status = load_all_gui_components(); - if (!status) goto failed_to_load_editor; + if (!status) goto failed_to_load_gui_components; gtk_widget_show_now(editor); } + /** + * Pour éviter le message de GCC : + * + * """ + * warning: ‘editor’ may be used uninitialized in this function [-Wmaybe-uninitialized] + * """ + */ + else + editor = NULL; + init_all_plugins(true); config = get_main_configuration(); @@ -411,12 +421,14 @@ int main(int argc, char **argv) exit_all_plugins(); if (!batch_mode) - g_object_unref(G_OBJECT(editor)); + unload_all_gui_components(); - failed_to_load_editor: + failed_to_load_gui_components: if (!batch_mode) - unload_all_gui_components(); + g_object_unref(G_OBJECT(editor)); + + failed_to_load_editor: unload_all_basic_components(); |