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:
Pekka Paalanen 2025-12-16 13:15:13 +02:00 committed by Marius Vlad
parent 92c15464aa
commit 66eaeb0c3f

View file

@ -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;