mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
tests/fifo: fix false-positive uninitialized width
GCC 14.2 with debugoptimized build complained:
../../git/weston/tests/fifo-test.c: In function ‘get_surface_width’:
../../git/weston/tests/fifo-test.c:493:16: error: ‘width’ may be used uninitialized [-Werror=maybe-uninitialized]
493 | return width;
| ^~~~~
../../git/weston/tests/fifo-test.c:477:13: note: ‘width’ was declared here
477 | int width;
| ^~~~~
The debug build did not complain.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
92c15464aa
commit
66eaeb0c3f
1 changed files with 1 additions and 1 deletions
|
|
@ -474,7 +474,7 @@ get_surface_width(struct client *client,
|
|||
struct wet_testsuite_data *suite_data,
|
||||
bool rearm)
|
||||
{
|
||||
int width;
|
||||
int width = -1;
|
||||
|
||||
RUN_INSIDE_BREAKPOINT(client, suite_data) {
|
||||
struct weston_surface *surface;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue