[totem] all: Fix compile-time warning with GCC7



commit 3333ea1bbfaf3ef815d97e08863b596b66a51ed0
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jun 26 12:15:42 2017 +0200

    all: Fix compile-time warning with GCC7
    
    duplicate ‘const’ declaration specifier [-Wduplicate-decl-specifier]
    
    The warning was added in:
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43651
    just for this purpose.
    
    "
    int foo(const char const *data);
                       ^~~~~~
    1 warning generated.
    
    [...] In that case it was clearly a mistake, because the author meant
    'const char *const data' [...]
    "

 src/backend/bacon-video-widget.c                 |    2 +-
 src/plugins/properties/totem-movie-properties.c  |    2 +-
 src/plugins/save-file/totem-save-file.c          |    2 +-
 src/plugins/screenshot/totem-screenshot-plugin.c |    4 ++--
 src/totem-grilo.c                                |   18 +++++++++---------
 src/totem-menu.c                                 |    2 +-
 6 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index f05e1c9..a8a5dba 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -6054,7 +6054,7 @@ static void
 listen_navigation_events (ClutterActor *actor,
                           BaconVideoWidget *bvw)
 {
-  const char const *events[] = {
+  const char * const events[] = {
     "button-press-event",
     "button-release-event",
     "motion-event"
diff --git a/src/plugins/properties/totem-movie-properties.c b/src/plugins/properties/totem-movie-properties.c
index 465d89e..f80e143 100644
--- a/src/plugins/properties/totem-movie-properties.c
+++ b/src/plugins/properties/totem-movie-properties.c
@@ -311,7 +311,7 @@ impl_deactivate (PeasActivatable *plugin)
 {
        TotemMoviePropertiesPlugin *pi;
        TotemObject *totem;
-       const char const *accels[] = { NULL };
+       const char * const accels[] = { NULL };
 
        pi = TOTEM_MOVIE_PROPERTIES_PLUGIN (plugin);
        totem = g_object_get_data (G_OBJECT (plugin), "object");
diff --git a/src/plugins/save-file/totem-save-file.c b/src/plugins/save-file/totem-save-file.c
index ea430a0..2700e5c 100644
--- a/src/plugins/save-file/totem-save-file.c
+++ b/src/plugins/save-file/totem-save-file.c
@@ -328,7 +328,7 @@ impl_activate (PeasActivatable *plugin)
        GMenuItem *item;
        char *path;
        char *mrl;
-       const char const *accels[] = { "<Primary>S", "Save", NULL };
+       const char * const accels[] = { "<Primary>S", "Save", NULL };
 
        /* make sure nautilus is in the path */
        path = g_find_program_in_path ("nautilus");
diff --git a/src/plugins/screenshot/totem-screenshot-plugin.c 
b/src/plugins/screenshot/totem-screenshot-plugin.c
index b2d13af..2d488b5 100644
--- a/src/plugins/screenshot/totem-screenshot-plugin.c
+++ b/src/plugins/screenshot/totem-screenshot-plugin.c
@@ -308,7 +308,7 @@ impl_activate (PeasActivatable *plugin)
        TotemScreenshotPluginPrivate *priv = self->priv;
        GMenu *menu;
        GMenuItem *item;
-       const char const *accels[]= { "<Primary><Alt>s", NULL };
+       const char * const accels[]= { "<Primary><Alt>s", NULL };
 
        priv->totem = g_object_get_data (G_OBJECT (plugin), "object");
        priv->bvw = BACON_VIDEO_WIDGET (totem_object_get_video_widget (priv->totem));
@@ -361,7 +361,7 @@ static void
 impl_deactivate (PeasActivatable *plugin)
 {
        TotemScreenshotPluginPrivate *priv = TOTEM_SCREENSHOT_PLUGIN (plugin)->priv;
-       const char const *accels[] = { NULL };
+       const char * const accels[] = { NULL };
 
        /* Disconnect signal handlers */
        g_signal_handler_disconnect (G_OBJECT (priv->bvw), priv->got_metadata_signal);
diff --git a/src/totem-grilo.c b/src/totem-grilo.c
index 6081935..5ecc82a 100644
--- a/src/totem-grilo.c
+++ b/src/totem-grilo.c
@@ -177,10 +177,10 @@ enum {
 };
 
 static gboolean
-strv_has_prefix (const char **strv,
-                const char  *str)
+strv_has_prefix (const char * const *strv,
+                const char         *str)
 {
-       const char **s = strv;
+       const char * const *s = strv;
 
        while (*s) {
                if (g_str_has_prefix (str, *s))
@@ -195,7 +195,7 @@ static gboolean
 source_is_blacklisted (GrlSource *source)
 {
        const char *id;
-       const char const *sources[] = {
+       const char * const sources[] = {
                "grl-shoutcast",
                "grl-flickr",
                "grl-podcasts",
@@ -213,7 +213,7 @@ static gboolean
 source_is_browse_blacklisted (GrlSource *source)
 {
        const char *id;
-       const char const *sources[] = {
+       const char * const sources[] = {
                /* https://bugzilla.gnome.org/show_bug.cgi?id=722422 */
                "grl-youtube",
                NULL
@@ -229,7 +229,7 @@ static gboolean
 source_is_search_blacklisted (GrlSource *source)
 {
        const char *id;
-       const char const *sources[] = {
+       const char * const sources[] = {
                "grl-metadata-store",
                NULL
        };
@@ -244,7 +244,7 @@ static gboolean
 source_is_recent (GrlSource *source)
 {
        const char *id;
-       const char const *sources[] = {
+       const char * const sources[] = {
                "grl-tracker-source",
                "grl-optical-media",
                "grl-bookmarks",
@@ -2186,8 +2186,8 @@ static void
 setup_browse (TotemGrilo *self)
 {
        GtkAdjustment *adj;
-       const char const * select_all_accels[] = { "<Primary>A", NULL };
-       const char const * select_none_accels[] = { "<Shift><Primary>A", NULL };
+       const char * const select_all_accels[] = { "<Primary>A", NULL };
+       const char * const select_none_accels[] = { "<Shift><Primary>A", NULL };
 
        /* Search */
        gtk_search_bar_connect_entry (GTK_SEARCH_BAR (self->priv->search_bar),
diff --git a/src/totem-menu.c b/src/totem-menu.c
index 7a1c43f..cc7cbed 100644
--- a/src/totem-menu.c
+++ b/src/totem-menu.c
@@ -343,7 +343,7 @@ totem_app_menu_setup (Totem *totem)
 {
        GMenuModel *appmenu;
        char *accels[] = { NULL, NULL };
-       const char const *shortcuts_accels[] = {
+       const char * const shortcuts_accels[] = {
                "<Ctrl>H",
                "<Ctrl>question",
                "<Ctrl>F1",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]