weston/clients
Quentin Glidic c0271533d0 terminal: Silence maybe-uninitialized warning
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.

'I found it weird that the compiler wouldn’t see that, so I re-checked
the code.

I think with -O3, this specific "for" is compile-time unlooped, and
utf8_next_char inlined.  And there is *one* path that can keep
machine.state to utf8state_start, thus triggering the warning.

Without -O3, the function is globally tagged as “changing unicode”, so
no warning is produced.

[...]

Side note: I picked 0 as the default value, but maybe in this case
0xfffd would be better?'

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-11-16 15:45:48 +00:00
..
calibrator.c Moved helper macro to a discrete include file. 2015-06-15 17:11:45 -07:00
clickdot.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
cliptest.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
confine.c clients/confine: Toggle maximized state with 'm' 2016-07-26 17:21:15 +08:00
desktop-shell.c config-parser: Add weston_config_section_get_color 2016-07-26 15:57:14 -07:00
dnd.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
editor.c weston-editor: Close the data source after sending 2016-08-16 12:51:49 +08:00
eventdemo.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
flower.c client: fix spelling mistake 2016-04-05 16:00:21 -07:00
fullscreen.c clients: Use zalloc 2016-03-09 22:54:54 -08:00
gears.c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
image.c cosmetic: Remove a few double semicolons 2015-10-07 11:22:03 -07:00
ivi-shell-user-interface.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
keyboard.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
multi-resource.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
nested-client.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
nested.c clients/nested: use weston_check_egl_extension over strstr 2016-07-22 15:29:04 +01:00
presentation-shm.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
resizor.c clients/resizor: Use pointer locking for resizing window 2016-07-26 17:21:15 +08:00
scaler.c clients: Fix weston-scaler source-only mode to use integer width and height 2016-11-16 14:46:22 +00:00
screenshot.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
simple-damage.c clients/simple-damage: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-dmabuf-intel.c clients/simple-dmabuf-intel: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-dmabuf-v4l.c gl-renderer, simple-dmabuf-v4l: fix dmabuf y-invert 2016-08-15 19:07:48 +02:00
simple-egl.c clients/simple-egl: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-im.c simple-im: Rename source file to be consistent with other client tools 2016-10-12 14:03:11 -07:00
simple-shm.c clients/simple-shm: Port to xdg_shell unstable v6 2016-08-15 20:15:58 +08:00
simple-touch.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
smoke.c client: fix spelling mistake 2016-04-05 16:00:21 -07:00
stacking.c clients/stacking: Silence a compiler warning 2016-10-01 11:20:13 +02:00
subsurfaces.c clients & tests: Unify multiple definitions of x*alloc and related functions 2016-03-17 14:13:13 +02:00
terminal.c terminal: Silence maybe-uninitialized warning 2016-11-16 15:45:48 +00:00
transformed.c clients: Update boilerplate from MIT X11 license to MIT Expat licenses 2015-06-15 13:04:18 -07:00
weston-info.c include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
window.c xdg-shell: validate positioner object 2016-11-16 10:31:11 +08:00
window.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00