mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
backend-drm: Initialize bo_fd
On some aarch64 platforms with GCC13 we're seeing:
../../../weston-14-new/libweston/backend-drm/fb.c:152:15: warning: 'bo_fd' may be used uninitialized [-Wmaybe-uninitialized]
152 | ret = drmPrimeFDToHandle(fb->fd, bo_fd, &handle);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../weston-14-new/libweston/backend-drm/fb.c: In function 'drm_fb_addfb':
../../../weston-14-new/libweston/backend-drm/fb.c:117:13: note: 'bo_fd' was declared here
117 | int bo_fd;
Just initialize it to avoid trigger the warning.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
42aeea2220
commit
2bb8cdba83
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ static void gem_handle_put(struct drm_device *device, int handle)
|
|||
static int
|
||||
drm_fb_import_plane(struct drm_device *device, struct drm_fb *fb, int plane)
|
||||
{
|
||||
int bo_fd;
|
||||
int bo_fd = -1;
|
||||
uint32_t handle;
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue