aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-04-02 09:30:18 +0200
committerPeter Maydell <peter.maydell@linaro.org>2019-04-12 12:58:00 +0100
commite1be98540ee672ef93292b65a986055512237c35 (patch)
tree2034111c5eac0118ae520fea33ae26ae9ff8ba8d /ui
parent9e4a484b4a9e4c03682a4c42fdef8c1a9ac433b5 (diff)
downloadqemu-e1be98540ee672ef93292b65a986055512237c35.zip
qemu-e1be98540ee672ef93292b65a986055512237c35.tar.gz
qemu-e1be98540ee672ef93292b65a986055512237c35.tar.bz2
curses: fix wchar_t printf warning
On some systems wchar_t is "long int", on others just "int". So go cast to "long int" and adjust the printf format accordingly. Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20190402073018.17747-1-kraxel@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/curses.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/curses.c b/ui/curses.c
index cc6d6da..fb63945 100644
--- a/ui/curses.c
+++ b/ui/curses.c
@@ -453,8 +453,8 @@ static uint16_t get_ucs(wchar_t wch, iconv_t conv)
swch = sizeof(wch);
if (iconv(conv, &pwch, &swch, &pch, &sch) == (size_t) -1) {
- fprintf(stderr, "Could not convert 0x%02x from WCHAR_T to UCS-2: %s\n",
- wch, strerror(errno));
+ fprintf(stderr, "Could not convert 0x%02lx from WCHAR_T to UCS-2: %s\n",
+ (unsigned long)wch, strerror(errno));
return 0xFFFD;
}