From 40753f9d02d0f3598d0674fedc7b80ae78f6df2b Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Sat, 15 Jul 2017 22:45:11 +1000 Subject: [PATCH] fix some constant strings so they're actually constant gcc 7 warns about the broken definitions. https://bugzilla.gnome.org/show_bug.cgi?id=784957 --- lib/rb-text-helpers.c | 10 +++++----- widgets/rb-header.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/rb-text-helpers.c b/lib/rb-text-helpers.c index f8cd2ee13..2d4472ed4 100644 --- a/lib/rb-text-helpers.c +++ b/lib/rb-text-helpers.c @@ -49,11 +49,11 @@ * * the following constants are in UTF-8 encoding */ -static const char const *UNICODE_LRM = "\xE2\x80\x8E"; -static const char const *UNICODE_RLM = "\xE2\x80\x8F"; -static const char const *UNICODE_LRE = "\xE2\x80\xAA"; -static const char const *UNICODE_RLE = "\xE2\x80\xAB"; -static const char const *UNICODE_PDF = "\xE2\x80\xAC"; +static const char *const UNICODE_LRM = "\xE2\x80\x8E"; +static const char *const UNICODE_RLM = "\xE2\x80\x8F"; +static const char *const UNICODE_LRE = "\xE2\x80\xAA"; +static const char *const UNICODE_RLE = "\xE2\x80\xAB"; +static const char *const UNICODE_PDF = "\xE2\x80\xAC"; static void append_and_free (GString *str, char *text) diff --git a/widgets/rb-header.c b/widgets/rb-header.c index c37a53c0f..262584941 100644 --- a/widgets/rb-header.c +++ b/widgets/rb-header.c @@ -163,7 +163,7 @@ enum #define STREAM_FORMAT "%s" /* unicode graphic characters, encoded in UTF-8 */ -static const char const *UNICODE_MIDDLE_DOT = "\xC2\xB7"; +static const char *const UNICODE_MIDDLE_DOT = "\xC2\xB7"; #define SCROLL_UP_SEEK_OFFSET 5 #define SCROLL_DOWN_SEEK_OFFSET -5