summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-02-12 18:52:00 +0200
committerErnestas Kulik <ernestask@gnome.org>2018-02-12 19:05:24 +0200
commit50299b7330fc3dde069548b12df30db60d0f9eb7 (patch)
tree4acb9b589dcd123ed84729bc70e949785109edc7
parent5db5f5dd7c6ea7a2e2dbf296fcee20617ee566df (diff)
downloadgnome-desktop-50299b7330fc3dde069548b12df30db60d0f9eb7.tar.gz
Add const-qualifier when assigning string literals
This also requires some casting when using due to legacy requirements. The string is never modified, so it’s fine. https://bugzilla.gnome.org/show_bug.cgi?id=793195
-rw-r--r--libgnome-desktop/gnome-languages.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgnome-desktop/gnome-languages.c b/libgnome-desktop/gnome-languages.c
index cbf82d33..f6756baf 100644
--- a/libgnome-desktop/gnome-languages.c
+++ b/libgnome-desktop/gnome-languages.c
@@ -509,12 +509,12 @@ static gboolean
collect_locales_from_localebin (void)
{
gboolean found_locales = FALSE;
- gchar *argv[] = { "locale", "-a", NULL };
- gchar **linep;
+ const gchar *argv[] = { "locale", "-a", NULL };
+ gchar **linep;
g_auto (GStrv) lines = NULL;
g_autofree gchar *output = NULL;
- if (g_spawn_sync (NULL, argv, NULL,
+ if (g_spawn_sync (NULL, (gchar **) argv, NULL,
G_SPAWN_SEARCH_PATH|G_SPAWN_STDERR_TO_DEV_NULL,
NULL, NULL, &output, NULL, NULL, NULL) == FALSE)
return FALSE;