On Fri, 29 Mar 2019 at 17:23, Philippe Mathieu-Daudé <f4...@amsat.org> wrote: > > Le ven. 29 mars 2019 13:53, Andrew Randrianasulu <randrianas...@gmail.com> > a écrit : > > > В сообщении от Friday 29 March 2019 11:40:42 Alex Bennée написал(а): > > > This will break 64 bit compiles: > > > > > > ui/curses.c: In function ‘get_ucs’: > > > ui/curses.c:456:50: error: format ‘%lx’ expects argument of type ‘long > > unsigned int’, but argument 3 has type ‘wchar_t’ {aka ‘int’} > > [-Werror=format=] > > > > > > Annoyingly it seems wchar_t can be various sizes on various platforms. > > > Maybe the simplest solution would be to upcast to a known size? > > > > > > fprintf(stderr, "Could not convert %" PRIx32 " from WCHAR_T to > > UCS-2: %s\n", > > > (uint32_t) wch, strerror(errno)); > > > > Can you simply use uint16_t instead? UCS-2 chars fit in 16bit.
We're not printing a UCS-2 character, though, we're printing a wchar_t, which isn't necessarily 16 bits. thanks -- PMM