[file-roller/wip/jtojnar/engrampa-backports: 24/24] Fix bunch of remaining warnings
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller/wip/jtojnar/engrampa-backports: 24/24] Fix bunch of remaining warnings
- Date: Wed, 27 Jul 2022 19:54:33 +0000 (UTC)
commit c57be3be1d16b74fbc5d6a22b23f2016c74638af
Author: Jan Tojnar <jtojnar gmail com>
Date: Wed Jul 27 20:55:16 2022 +0200
Fix bunch of remaining warnings
warning: ‘icon_extents.height’ may be used uninitialized [-Wmaybe-uninitialized]
warning: cast between incompatible function types from ‘void (*)(NautilusMenuProviderInterface *)’ {aka
‘void (*)(struct _NautilusMenuProviderInterface *)’} to ‘void (*)(void *, void *)’ [-Wcast-function-type]
Also enable -Wextra instead of bunch of separate flags.
meson.build | 8 ++------
nautilus/nautilus-fileroller.c | 10 +++++-----
src/eggtreemultidnd.c | 2 +-
src/fr-init.c | 5 ++---
4 files changed, 10 insertions(+), 15 deletions(-)
---
diff --git a/meson.build b/meson.build
index d6b95f61..4a9bb37a 100644
--- a/meson.build
+++ b/meson.build
@@ -112,17 +112,13 @@ c_args = [ '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38' ]
if get_option('buildtype').contains('debug')
test_args = [
'-Wall',
+ '-Wextra',
'-Wcast-align',
- '-Wtype-limits',
- '-Wclobbered',
- '-Wempty-body',
- '-Wignored-qualifiers',
'-Wmissing-prototypes',
'-Wnested-externs',
'-Wpointer-arith',
- '-Wsign-compare',
'-Wformat-security',
- '-Wmissing-field-initializers',
+ '-Wno-unused-parameter',
]
else
c_args += [ '-Wno-deprecated-declarations' ]
diff --git a/nautilus/nautilus-fileroller.c b/nautilus/nautilus-fileroller.c
index 18d7d151..3d41d686 100644
--- a/nautilus/nautilus-fileroller.c
+++ b/nautilus/nautilus-fileroller.c
@@ -293,22 +293,22 @@ nautilus_fr_get_file_items (NautilusMenuProvider *provider,
static void
-nautilus_fr_menu_provider_interface_init (NautilusMenuProviderInterface *interface)
+nautilus_fr_menu_provider_interface_init (NautilusMenuProviderInterface *g_iface, gpointer iface_data)
{
- interface->get_file_items = nautilus_fr_get_file_items;
+ g_iface->get_file_items = nautilus_fr_get_file_items;
}
static void
-nautilus_fr_instance_init (NautilusFr *fr)
+nautilus_fr_instance_init (NautilusFr *fr, NautilusFrClass* g_class)
{
}
static void
-nautilus_fr_class_init (NautilusFrClass *class)
+nautilus_fr_class_init (NautilusFrClass *g_class, gpointer class_data)
{
- parent_class = g_type_class_peek_parent (class);
+ parent_class = g_type_class_peek_parent (g_class);
}
diff --git a/src/eggtreemultidnd.c b/src/eggtreemultidnd.c
index e77d79c9..0287bea7 100644
--- a/src/eggtreemultidnd.c
+++ b/src/eggtreemultidnd.c
@@ -370,7 +370,7 @@ egg_tree_multi_drag_motion_event (GtkWidget *widget,
/* create a multi row drag icon */
const int icon_offset = DRAG_ICON_OFFSET;
- GdkRectangle icon_extents;
+ GdkRectangle icon_extents = { };
cairo_surface_t *multi_drag_icon;
cairo_t *cr;
int n_icons, i, offset;
diff --git a/src/fr-init.c b/src/fr-init.c
index 8928e19f..94f23808 100644
--- a/src/fr-init.c
+++ b/src/fr-init.c
@@ -247,8 +247,8 @@ fr_registered_archive_new (GType command_type)
reg_com = g_new0 (FrRegisteredArchive, 1);
reg_com->ref = 1;
reg_com->type = command_type;
- reg_com->caps = g_ptr_array_new ();
- reg_com->packages = g_ptr_array_new ();
+ reg_com->caps = g_ptr_array_new_with_free_func (g_free);
+ reg_com->packages = g_ptr_array_new_with_free_func (g_free);
archive = (FrArchive*) g_object_new (reg_com->type, NULL);
mime_types = fr_archive_get_supported_types (archive);
@@ -290,7 +290,6 @@ fr_registered_archive_unref (FrRegisteredArchive *reg_com)
if (--(reg_com->ref) != 0)
return;
- g_ptr_array_foreach (reg_com->caps, (GFunc) g_free, NULL);
g_ptr_array_free (reg_com->caps, TRUE);
g_free (reg_com);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]