diff options
author | Wu Xiaotian <[email protected]> | 2019-07-01 16:46:07 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-05 14:37:18 +0200 |
commit | 3335393125ba274f0d5eaee56b73b69a89339696 (patch) | |
tree | d45d0e2e82716e9babde38b01a6c976ac47693bc | |
parent | 4f50b699b30245d1b9098111573f840a271a2011 (diff) | |
download | mate-settings-daemon-3335393125ba274f0d5eaee56b73b69a89339696.tar.bz2 mate-settings-daemon-3335393125ba274f0d5eaee56b73b69a89339696.tar.xz |
Avoid build warning
/usr/include/glib-2.0/glib/gmacros.h:366:42: warning: division ‘sizeof (gchar ** {aka char **}) / sizeof (gchar * {aka char *})’ does not compute the number of array elements [-Wsizeof-pointer-div]
366 | #define G_N_ELEMENTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
| ^
msd-ldsm-dialog.c:163:25: note: in expansion of macro ‘G_N_ELEMENTS’
163 | for (i = 0; i < G_N_ELEMENTS (settings_list); i++) {
| ^~~~~~~~~~~~
-rw-r--r-- | plugins/housekeeping/msd-ldsm-dialog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/housekeeping/msd-ldsm-dialog.c b/plugins/housekeeping/msd-ldsm-dialog.c index f045550..f3a614f 100644 --- a/plugins/housekeeping/msd-ldsm-dialog.c +++ b/plugins/housekeeping/msd-ldsm-dialog.c @@ -160,7 +160,7 @@ ignore_check_button_toggled_cb (GtkToggleButton *button, settings_list = g_settings_get_strv (settings, SETTINGS_IGNORE_PATHS); - for (i = 0; i < G_N_ELEMENTS (settings_list); i++) { + for (i = 0; i < g_strv_length (settings_list); i++) { if (settings_list[i] != NULL) ignore_paths = g_slist_prepend (ignore_paths, g_strdup (settings_list[i])); } |