mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 20:06:18 +01:00
Merge branch 'disable-assert-warning-fix' into 'main'
gmenuexporter: Fix warning of unused n_items when building with G_DISABLE_ASSERT See merge request GNOME/glib!3159
This commit is contained in:
commit
f64fc32310
@ -252,12 +252,16 @@ g_menu_exporter_menu_items_changed (GMenuModel *model,
|
|||||||
GMenuExporterMenu *menu = user_data;
|
GMenuExporterMenu *menu = user_data;
|
||||||
GSequenceIter *point;
|
GSequenceIter *point;
|
||||||
gint i;
|
gint i;
|
||||||
|
#ifndef G_DISABLE_ASSERT
|
||||||
gint n_items;
|
gint n_items;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_assert (menu->model == model);
|
g_assert (menu->model == model);
|
||||||
g_assert (menu->item_links != NULL);
|
g_assert (menu->item_links != NULL);
|
||||||
|
|
||||||
|
#ifndef G_DISABLE_ASSERT
|
||||||
n_items = g_sequence_get_length (menu->item_links);
|
n_items = g_sequence_get_length (menu->item_links);
|
||||||
|
#endif
|
||||||
g_assert (position >= 0 && position < G_MENU_EXPORTER_MAX_SECTION_SIZE);
|
g_assert (position >= 0 && position < G_MENU_EXPORTER_MAX_SECTION_SIZE);
|
||||||
g_assert (removed >= 0 && removed < G_MENU_EXPORTER_MAX_SECTION_SIZE);
|
g_assert (removed >= 0 && removed < G_MENU_EXPORTER_MAX_SECTION_SIZE);
|
||||||
g_assert (added < G_MENU_EXPORTER_MAX_SECTION_SIZE);
|
g_assert (added < G_MENU_EXPORTER_MAX_SECTION_SIZE);
|
||||||
|
Loading…
Reference in New Issue
Block a user