From a19eed46919fc0996874b5061b3c8783a3d67403 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 22 Jan 2018 12:49:29 +0000 Subject: [PATCH] tests: Add a missing const to a variable in the GConvert tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also rename it to make it clearer how it’s encoded (as UTF-8). Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=790698 --- glib/tests/convert.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glib/tests/convert.c b/glib/tests/convert.c index 8e9e4d708..422989739 100644 --- a/glib/tests/convert.c +++ b/glib/tests/convert.c @@ -58,13 +58,13 @@ test_iconv_state (void) static void test_one_half (void) { - gchar *in = "\xc2\xbd"; + const gchar *in_utf8 = "\xc2\xbd"; gchar *out; gsize bytes_read = 0; gsize bytes_written = 0; GError *error = NULL; - out = g_convert (in, -1, + out = g_convert (in_utf8, -1, "ISO-8859-1", "UTF-8", &bytes_read, &bytes_written, &error); @@ -75,7 +75,7 @@ test_one_half (void) g_assert_cmpstr (out, ==, "\xbd"); g_free (out); - out = g_convert (in, -1, + out = g_convert (in_utf8, -1, "ISO-8859-15", "UTF-8", &bytes_read, &bytes_written, &error); @@ -87,7 +87,7 @@ test_one_half (void) g_clear_error (&error); g_free (out); - out = g_convert_with_fallback (in, -1, + out = g_convert_with_fallback (in_utf8, -1, "ISO8859-15", "UTF-8", "a", &bytes_read, &bytes_written,