summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2020-03-31 14:59:04 +0100
committerRobin Watts <Robin.Watts@artifex.com>2020-03-31 17:40:16 +0100
commita32c6fdce5fab7d5918d02d30a4cf6696af58db3 (patch)
tree49ea8ef7787ad7d72bb9299f9ac40b498686e769
parent4dd43e9ca448777bbd585ef3ce97e9cf593f395d (diff)
downloadghostpdl-a32c6fdce5fab7d5918d02d30a4cf6696af58db3.tar.gz
Squash some compiler warnings.
-rw-r--r--base/gsicc_cache.c8
-rw-r--r--base/gsptype1.c2
2 files changed, 4 insertions, 6 deletions
diff --git a/base/gsicc_cache.c b/base/gsicc_cache.c
index 7e6504ea5..673d223e4 100644
--- a/base/gsicc_cache.c
+++ b/base/gsicc_cache.c
@@ -1481,8 +1481,8 @@ gsicc_support_named_color(const gs_color_space *pcs, const gs_gstate *pgs)
int k, code, i, num_comp, num_spots=0, num_process=0, num_other=0;
gs_color_space_index type = gs_color_space_get_index(pcs);
char **names = NULL;
- byte *pname;
- uint name_size;
+ byte *pname = NULL; /* Silence compiler warning */
+ uint name_size = 0; /* Silence compiler warning */
bool is_supported;
/* Get the data for the named profile */
@@ -1504,6 +1504,7 @@ gsicc_support_named_color(const gs_color_space *pcs, const gs_gstate *pgs)
num_comp = pcs->params.device_n.num_components;
} else if (type == gs_color_space_index_Separation) {
pname = (byte *)pcs->params.separation.sep_name;
+ name_size = strlen(pcs->params.separation.sep_name);
num_comp = 1;
} else
return false;
@@ -1514,9 +1515,6 @@ gsicc_support_named_color(const gs_color_space *pcs, const gs_gstate *pgs)
pname = (byte *)names[i];
name_size = strlen(names[i]);
}
- else {
- name_size = strlen(pcs->params.separation.sep_name);
- }
/* Classify */
if (strncmp((char *)pname, "None", name_size) == 0 ||
diff --git a/base/gsptype1.c b/base/gsptype1.c
index 8edcd1faa..9259471fd 100644
--- a/base/gsptype1.c
+++ b/base/gsptype1.c
@@ -2128,7 +2128,7 @@ gx_dc_pattern_read(
/* we shouldn't have miltiple tiles locked, but check if OK before unlocking */
if (ptile->id != buf.id)
return_error(gs_error_unregistered); /* can't unlock some other tile in this slot */
- code = gx_pattern_cache_entry_set_lock(pgs, buf.id, false); /* make sure not locked */
+ code = gx_pattern_cache_entry_set_lock((gs_gstate *)pgs, buf.id, false); /* make sure not locked */
if (code < 0)
return code; /* can't happen since we call ensure_space above, but Coverity doesn't know that */
}