From e7367ea2279d65af2a6567aeb538ac90275de220 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Thu, 2 Mar 2023 19:18:32 +0000 Subject: gdev_prn_size_buf_planar: Initialise mdev. We create a device structure on the stack, and fill in just enough of it to be able to use existing code to return the size. Unfortunately, this produces valgrind warnings as some of the proc setup code trips over the device procs not all being zerod to start with. For the sake of valgrind, just clear the device when we create it. This is not something that happens often, so the speed hit should be negligible. --- base/gdevppla.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/gdevppla.c b/base/gdevppla.c index 93c6d5646..7ece491a1 100644 --- a/base/gdevppla.c +++ b/base/gdevppla.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -122,7 +122,7 @@ gdev_prn_size_buf_planar(gx_device_buf_space_t *space, gx_device *target, const gx_render_plane_t *render_plane, int height, bool for_band) { - gx_device_memory mdev; + gx_device_memory mdev = { 0 }; int code; if (render_plane && render_plane->index >= 0) -- cgit v1.2.1