On 10 July 2016 at 10:00, Quentin Glidic <[email protected]> wrote: > From: Quentin Glidic <[email protected]> > > clients/terminal.c: In function 'redraw_handler': > clients/terminal.c:213:28: warning: 'machine.unicode' may be used > uninitialized in this function [-Wmaybe-uninitialized] > struct utf8_state_machine machine; > ^~~~~~~ > > clients/terminal.c: In function 'handle_char': > clients/terminal.c:213:28: warning: 'machine.unicode' may be used > uninitialized in this function [-Wmaybe-uninitialized] > > Warning produced by GCC 5.3 and 6.1, with -O3. > > Signed-off-by: Quentin Glidic <[email protected]> > --- > > You have to look at the file directly to completely understand this one. > Not sure that is the value to return in this case, but at least it > silences the warning. > ::unicode will never be read (get_unicode) when it's invalid, since ::state will equal to utf8state_reject (as set in utf8_next_char). Seems like the compiler/optimiser cannot see that far, thus throws a warning message.
With anything vaguely like the above in the commit message, the patch is Reviewed-by: Emil Velikov <[email protected]> -Emil _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
