summaryrefslogtreecommitdiff
path: root/pcl
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-10-01 13:22:39 +0100
committerRobin Watts <Robin.Watts@artifex.com>2021-10-01 13:26:23 +0100
commitabd7cff390ec8d7d692bec66e74aa01e4819dece (patch)
tree5bf2f4e54cedaf8c428561672d0af3438480f942 /pcl
parent830afae5454dea3bff903869d82022306890a96c (diff)
downloadghostpdl-abd7cff390ec8d7d692bec66e74aa01e4819dece.tar.gz
LGTM warning suppressions and fixes.
Fix (hopefully) the last few LGTM warnings. Suppress warnings for those things that we can't avoid (use of goto in speed critical state machines for example), and fix those we can.
Diffstat (limited to 'pcl')
-rw-r--r--pcl/pcl/pcommand.c2
-rw-r--r--pcl/pcl/rtgmode.c2
-rw-r--r--pcl/pxl/pxfont.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/pcl/pcl/pcommand.c b/pcl/pcl/pcommand.c
index fd9c6df0c..b81894dc7 100644
--- a/pcl/pcl/pcommand.c
+++ b/pcl/pcl/pcommand.c
@@ -224,7 +224,7 @@ pcl_do_resets(pcl_state_t * pcs, pcl_reset_type_t type)
return pcl_do_resets_permanent(pcs);
}
- for (; *init && code >= 0; ++init) {
+ for (; *init; ++init) {
if ((*init)->do_reset) {
code = (*(*init)->do_reset) (pcs, type);
if (code < 0)
diff --git a/pcl/pcl/rtgmode.c b/pcl/pcl/rtgmode.c
index 8e921b2d2..d6fd7f5a3 100644
--- a/pcl/pcl/rtgmode.c
+++ b/pcl/pcl/rtgmode.c
@@ -551,7 +551,7 @@ set_compression_method(pcl_args_t * pargs, pcl_state_t * pcs)
pcs->raster_state.compression_mode = mode;
/* CCITT compression modes are always monochrome - install the
monochrome palette and restart raster. */
- if (mode >= 6 && mode <= 9) {
+ if (mode >= 6 && mode <= 9) { /* lgtm [cpp/constant-comparison] */
pcl_palette_CCITT_raster(pcs);
if (pcs->raster_state.graphics_mode) {
coord x = pcs->cap.x;
diff --git a/pcl/pxl/pxfont.c b/pcl/pxl/pxfont.c
index 178fd30fe..b7e4013bf 100644
--- a/pcl/pxl/pxfont.c
+++ b/pcl/pxl/pxfont.c
@@ -248,7 +248,7 @@ px_define_font(px_font_t * pxfont, byte * header, ulong size, gs_id id,
if (header[4] == plfst_TrueType) {
pxfont->is_xl_format = true;
- pl_prepend_xl_dummy_header(mem, &header);
+ pl_prepend_xl_dummy_header(mem, &header); /* lgtm [cpp/useless-expression] */
pxfont->header = header;
pxfont->header_size = gs_object_size(mem, header);
} else {