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.

Samuel

Reply via email to