On Fri, 15 Mar 2019 at 10:52, Samuel Thibault <samuel.thiba...@gnu.org> wrote: > > Peter Maydell, le ven. 15 mars 2019 10:06:48 +0000, a ecrit: > > > + curses_line[x] = (cchar_t) {}; > > > curses_line[x].chars[0] = ch; > > > - curses_line[x].chars[1] = 0; > > > - curses_line[x].attr = 0; > > > } > > > curses_line[x].attr |= at; > > > > Does this really need the cast ? > > Yes, otherwise it is refused by the compiler. > > > {} is supposed to be a universal initializer. > > When used as initialized (cchar_t foo = {}), yes. But when used in > assignations, no, one has to cast it.
Ah -- I hadn't realized that wrinkle; thanks for the explanation. Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM