summaryrefslogtreecommitdiff
path: root/base/gdevdgbr.c
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2016-05-18 13:28:13 +0100
committerKen Sharp <ken.sharp@artifex.com>2016-05-18 13:28:13 +0100
commit93f26fbb884a6a26016c86e25c64f2bcd061949f (patch)
tree93ef2388e5648a92b99c2d330a0860d21ff3b96c /base/gdevdgbr.c
parenta045d4290e2b371ed4ed8de210f8a9efa4989d01 (diff)
downloadghostpdl-93f26fbb884a6a26016c86e25c64f2bcd061949f.tar.gz
Coverity IDs 126571, 126572, 126577
Fallout from the change from macros to inline functions, change a function parameter from uint32 * to ushort * and remove the redundant type casts Change a variable from unint32 to ushort Finally, remove a redundant check for < 0 on an unsigned variable.
Diffstat (limited to 'base/gdevdgbr.c')
-rw-r--r--base/gdevdgbr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/base/gdevdgbr.c b/base/gdevdgbr.c
index 2e4658d2c..79dae2208 100644
--- a/base/gdevdgbr.c
+++ b/base/gdevdgbr.c
@@ -374,7 +374,7 @@ gx_get_bits_copy(gx_device * dev, int x, int w, int h,
plane = i;
}
/* Ensure at least one plane is requested */
- if (i < 0 || plane < 0)
+ if (plane < 0)
return_error(gs_error_rangecheck); /* No planes */
source.data.read = src_base;
source.raster = dev_raster;
@@ -436,7 +436,8 @@ gx_get_bits_std_to_native(gx_device * dev, int x, int w, int h,
int j;
uchar k;
frac sc[4], dc[GX_DEVICE_COLOR_MAX_COMPONENTS];
- gx_color_value v[GX_DEVICE_COLOR_MAX_COMPONENTS], va = alpha_default;
+ gx_color_value v[GX_DEVICE_COLOR_MAX_COMPONENTS];
+ gx_color_value va = alpha_default;
gx_color_index pixel;
bool do_alpha = false;
const gx_cm_color_map_procs * map_procs;
@@ -445,7 +446,7 @@ gx_get_bits_std_to_native(gx_device * dev, int x, int w, int h,
/* Fetch the source data. */
if (stored->options & GB_ALPHA_FIRST) {
- if (sample_load_next16((uint *)&va, &src, &sbit, src_depth) < 0)
+ if (sample_load_next16(&va, &src, &sbit, src_depth) < 0)
return_error(gs_error_rangecheck);
va = v2cv(va);
do_alpha = true;
@@ -453,12 +454,12 @@ gx_get_bits_std_to_native(gx_device * dev, int x, int w, int h,
for (j = 0; j < ncolors; ++j) {
gx_color_value vj;
- if (sample_load_next16((uint *)&vj, &src, &sbit, src_depth) < 0)
+ if (sample_load_next16(&vj, &src, &sbit, src_depth) < 0)
return_error(gs_error_rangecheck);
sc[j] = v2frac(vj);
}
if (stored->options & GB_ALPHA_LAST) {
- if (sample_load_next16((uint *)&va, &src, &sbit, src_depth) < 0)
+ if (sample_load_next16(&va, &src, &sbit, src_depth) < 0)
return_error(gs_error_rangecheck);
va = v2cv(va);
do_alpha = true;