aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fish_tests.cpp
diff options
context:
space:
mode:
authorGravatar Andy Lutomirski <luto@kernel.org>2016-02-04 11:52:42 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-02-08 13:48:28 -0800
commitbc9e3c7546957dbcc7b6ef8e560bb7facec1a6f3 (patch)
treee66c570f3ebd0597196155734d1473933bf08c11 /src/fish_tests.cpp
parent57fcbecb41ad54cb9a3ef968787dd990de030f4c (diff)
fish_tests: Explicitly cast -2 to wchar_t
On arm, wchar_t is unsigned, and C++11 and newer disallow implicit narrowing conversions inside braces. Use an explicit conversion to fix the build on GCC 6 and up, which defaults to C++11.
Diffstat (limited to 'src/fish_tests.cpp')
-rw-r--r--src/fish_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fish_tests.cpp b/src/fish_tests.cpp
index f875438d..fc2b2cab 100644
--- a/src/fish_tests.cpp
+++ b/src/fish_tests.cpp
@@ -1154,7 +1154,7 @@ static void test_utf8()
wchar_t w4[] = {0x15555, 0xf7777, 0xa};
wchar_t w5[] = {0x255555, 0x1fa04ff, 0xddfd04, 0xa};
wchar_t w6[] = {0xf255555, 0x1dfa04ff, 0x7fddfd04, 0xa};
- wchar_t wb[] = {-2, 0xa, (wchar_t)0xffffffff, 0x0441};
+ wchar_t wb[] = {(wchar_t)-2, 0xa, (wchar_t)0xffffffff, 0x0441};
wchar_t wm[] = {0x41, 0x0441, 0x3042, 0xff67, 0x9b0d, 0x2e05da67};
wchar_t wb1[] = {0xa, 0x0422};
wchar_t wb2[] = {0xd800, 0xda00, 0x41, 0xdfff, 0xa};