summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-02-17 17:22:59 +0000
committerRobin Watts <Robin.Watts@artifex.com>2022-02-17 17:27:57 +0000
commit6ab3e23ad3f5998f08e6e1575eba2e7b57ab21b8 (patch)
treec048eb38aac8d882ad3e7623daaa50295a43111a
parented34784b0e649d8bbef46e47bec6d372168968ff (diff)
downloadghostpdl-6ab3e23ad3f5998f08e6e1575eba2e7b57ab21b8.tar.gz
Coverity 375564: Avoid uninitialised variable.
When we call zscreen_enum_init with a screen that doesn't set spot_function it can get copied into the graphics state. I couldn't satisfy myself that this never actually matters, so I settled for initing everything to zero for clarity. This is not speed critical code.
-rw-r--r--psi/zht.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/psi/zht.c b/psi/zht.c
index f1cc8d94d..96af0348a 100644
--- a/psi/zht.c
+++ b/psi/zht.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2021 Artifex Software, Inc.
+/* Copyright (C) 2001-2022 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -126,7 +126,7 @@ static int
zsetscreen(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
- gs_screen_halftone screen;
+ gs_screen_halftone screen = { 0 };
gx_ht_order order;
int code = zscreen_params(op, &screen);
gs_memory_t *mem;