diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2018-02-02 15:29:09 +0000 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2018-02-02 15:29:09 +0000 |
commit | fa4941c607680159ed62bfe79b754a099adf5a4e (patch) | |
tree | 0e3d5d7c447d3a4b8c43a7350e634d13c92c558d /base/gsdparam.c | |
parent | 3f38e3eeb6e6e7d88abbe1dca7675e237d5274e7 (diff) | |
download | ghostpdl-fa4941c607680159ed62bfe79b754a099adf5a4e.tar.gz |
squash more scanbuild warnings
check some return values.
Remove some initialisations that aren't required.
Remove soem unused variables.
Diffstat (limited to 'base/gsdparam.c')
-rw-r--r-- | base/gsdparam.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/base/gsdparam.c b/base/gsdparam.c index 122a8a8a4..71115c878 100644 --- a/base/gsdparam.c +++ b/base/gsdparam.c @@ -561,9 +561,16 @@ gx_default_get_params(gx_device * dev, gs_param_list * plist) */ if (dev_proc(dev, get_profile) != NULL) { code = dev_proc(dev, get_profile)(dev, &dev_profile); + if (code < 0) + return code; + if (dev_profile == NULL) { code = gsicc_init_device_profile_struct(dev, NULL, 0); + if (code < 0) + return code; code = dev_proc(dev, get_profile)(dev, &dev_profile); + if (code < 0) + return code; } /* It is possible that the current device profile name is NULL if we have a pdf14 device in line with a transparency group that is in a @@ -1215,6 +1222,8 @@ gx_default_put_intent(gsicc_rendering_intents_t icc_intent, gx_device * dev, code = gsicc_set_device_profile_intent(dev, icc_intent, index); } else { code = dev_proc(dev, get_profile)(dev, &profile_struct); + if (code < 0) + return code; if (profile_struct == NULL) { /* Create now */ dev->icc_struct = gsicc_new_device_profile_array(dev->memory); |