Initialize emulated_metadata fields to avoid uninitialized warnings
Set `emulated_metadata` fields to default values (0) to prevent potential usage of uninitialized variables in `virtgpu_virgl.c`. This fix ensures that the compilation doesn't fail due to warnings being treated as errors when using strict compiler flags. Change-Id: I2508168c095896c7fd492830ffb6ff3564dc2733 Signed-off-by: Dorinda Bassey <dbassey@redhat.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/5782849 Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Dominik Behr <dbehr@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
parent
71ca6afaef
commit
a2a049d9f5
1 changed files with 2 additions and 2 deletions
|
|
@ -260,7 +260,7 @@ static void virgl_get_emulated_transfers_params(const struct bo *bo,
|
|||
{
|
||||
uint32_t y_plane_height;
|
||||
uint32_t c_plane_height;
|
||||
struct bo_metadata emulated_metadata;
|
||||
struct bo_metadata emulated_metadata = { 0 };
|
||||
|
||||
if (transfer_box->x == 0 && transfer_box->y == 0 && transfer_box->width == bo->meta.width &&
|
||||
transfer_box->height == bo->meta.height) {
|
||||
|
|
@ -492,7 +492,7 @@ static int virgl_3d_bo_create(struct bo *bo, uint32_t width, uint32_t height, ui
|
|||
size_t i;
|
||||
uint32_t stride;
|
||||
struct drm_virtgpu_resource_create res_create = { 0 };
|
||||
struct bo_metadata emulated_metadata;
|
||||
struct bo_metadata emulated_metadata = { 0 };
|
||||
|
||||
if (virgl_supports_combination_natively(bo->drv, format, use_flags)) {
|
||||
stride = drv_stride_from_format(format, width, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue