[glib] tests: Add a missing const to a variable in the GConvert tests
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests: Add a missing const to a variable in the GConvert tests
- Date: Fri, 2 Feb 2018 09:04:51 +0000 (UTC)
commit a19eed46919fc0996874b5061b3c8783a3d67403
Author: Philip Withnall <withnall endlessm com>
Date: Mon Jan 22 12:49:29 2018 +0000
tests: Add a missing const to a variable in the GConvert tests
Also rename it to make it clearer how it’s encoded (as UTF-8).
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=790698
glib/tests/convert.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/convert.c b/glib/tests/convert.c
index 8e9e4d7..4229897 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]