diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-01-04 19:44:35 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-01-04 19:45:17 +0000 |
commit | 92e3e79af6a068f99a723aba56df6b2cd17bbb39 (patch) | |
tree | 3b8d79fd013719619525382ebee6d51e47b47e97 /contrib | |
parent | e3bc0494fc7084bd729a393e7bd6aebeeba6b6a9 (diff) | |
download | ghostpdl-92e3e79af6a068f99a723aba56df6b2cd17bbb39.tar.gz |
Squash clang warnings: Miscellaneous more warnings
All fairly self explainatory.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gdevgdi.c | 4 | ||||
-rw-r--r-- | contrib/gdevlx7.c | 24 | ||||
-rw-r--r-- | contrib/opvp/gdevopvp.c | 23 |
3 files changed, 24 insertions, 27 deletions
diff --git a/contrib/gdevgdi.c b/contrib/gdevgdi.c index ef11d9d98..41104b84d 100644 --- a/contrib/gdevgdi.c +++ b/contrib/gdevgdi.c @@ -467,10 +467,6 @@ unsigned long FrameTiffComp(unsigned char *pubDest, } else { - if(i == 0x253) - { - i = i; - } usLineSize = PreTiffComp(SrcPtr, usBytesPerLine); } SrcPtr += usBytesPerLine; diff --git a/contrib/gdevlx7.c b/contrib/gdevlx7.c index 043ac079a..99b3ac3e8 100644 --- a/contrib/gdevlx7.c +++ b/contrib/gdevlx7.c @@ -361,18 +361,22 @@ static void find_lr_pixels(byte *buf[],int bytelen,int bufheight, /* ------ Driver procedures ------ */ /*** THIS NEED TO BE REWORKED SOON ***/ -static const int LEFT_MARGIN=50; -static const int VERTSIZE=LX7_BSW_H; +enum { + LEFT_MARGIN=50, + VERTSIZE=LX7_BSW_H +}; /* offsets to print line sequence (defined in outbuf) */ -static const int IDX_SEQLEN=5; -static const int IDX_HORRES=8; -static const int IDX_PACKETS=13; -static const int IDX_5700DIF=12; -static const int IDX_HSTART=15; -static const int IDX_HEND=17; -static const int IDX_DATA=26; -static const int IDX_CARTRIDGE=10; +enum { + IDX_SEQLEN=5, + IDX_HORRES=8, + IDX_PACKETS=13, + IDX_5700DIF=12, + IDX_HSTART=15, + IDX_HEND=17, + IDX_DATA=26, + IDX_CARTRIDGE=10 +}; #define DIV8(x) ( (x) >> 3 ) #define MOD8(x) ( (x) & 0x7 ) diff --git a/contrib/opvp/gdevopvp.c b/contrib/opvp/gdevopvp.c index aca3e6acb..c8bc50dc6 100644 --- a/contrib/opvp/gdevopvp.c +++ b/contrib/opvp/gdevopvp.c @@ -489,7 +489,7 @@ static opvp_cspace_t cspace_0_2_to_1_0[] = { }; /* color space mapping 1.0 to 0.2 */ -static opvp_cspace_t cspace_1_0_to_0_2[] = { +static OPVP_ColorSpace cspace_1_0_to_0_2[] = { OPVP_cspaceBW, OPVP_cspaceDeviceGray, OPVP_cspaceDeviceCMY, @@ -501,7 +501,7 @@ static opvp_cspace_t cspace_1_0_to_0_2[] = { }; /* image format mapping 1.0 to 0.2 */ -static opvp_imageformat_t iformat_1_0_to_0_2[] = { +static OPVP_ImageFormat iformat_1_0_to_0_2[] = { OPVP_iformatRaw, OPVP_iformatRaw, /* OPVP_IFORMAT_MASK use iformat raw in 0.2 */ OPVP_iformatRLE, @@ -620,7 +620,7 @@ SetColorSpaceWrapper(opvp_dc_t printerContext, opvp_cspace_t cspace) *ErrorNo = OPVP_NOTSUPPORTED_0_2; return -1; } - if (cspace + if ((int)cspace >= sizeof(cspace_1_0_to_0_2)/sizeof(OPVP_ColorSpace)) { /* unknown color space */ *ErrorNo = OPVP_PARAMERROR_0_2; @@ -664,7 +664,7 @@ SetStrokeColorWrapper(opvp_dc_t printerContext, const opvp_brush_t *brush) /* 0.2 doesn't have OPVP_CSPACE_DEVICEKRGB */ return OPVP_NOTSUPPORTED; } - if (brush->colorSpace + if ((int)brush->colorSpace >= sizeof(cspace_1_0_to_0_2)/sizeof(OPVP_ColorSpace)) { /* unknown color space */ *ErrorNo = OPVP_PARAMERROR_0_2; @@ -691,7 +691,7 @@ SetFillColorWrapper(opvp_dc_t printerContext, const opvp_brush_t *brush) /* 0.2 doesn't have OPVP_CSPACE_DEVICEKRGB */ return OPVP_NOTSUPPORTED; } - if (brush->colorSpace + if ((int)brush->colorSpace >= sizeof(cspace_1_0_to_0_2)/sizeof(OPVP_ColorSpace)) { /* unknown color space */ *ErrorNo = OPVP_PARAMERROR_0_2; @@ -719,7 +719,7 @@ SetBgColorWrapper(opvp_dc_t printerContext, const opvp_brush_t *brush) *ErrorNo = OPVP_NOTSUPPORTED_0_2; return -1; } - if (brush->colorSpace + if ((int)brush->colorSpace >= sizeof(cspace_1_0_to_0_2)/sizeof(OPVP_ColorSpace)) { /* unknown color space */ *ErrorNo = OPVP_PARAMERROR_0_2; @@ -2061,8 +2061,7 @@ opvp_open(gx_device *dev) /* open printer device */ code = gdev_prn_open(dev); if (code < 0) { - ecode = ecode; - return ecode; + return code; } while (dev->child) { dev = dev->child; @@ -2072,16 +2071,14 @@ opvp_open(gx_device *dev) /* open output stream */ code = gdev_prn_open_printer_seekable(dev, true, false); if (code < 0) { - ecode = code; - return ecode; + return code; } outputFD = fileno(rdev->file); } /* RE-load vector driver */ if ((code = opvp_load_vector_driver())) { - ecode = code; - return ecode; + return code; } /* call opvpOpenPrinter */ @@ -2131,7 +2128,7 @@ opvp_open(gx_device *dev) int i; for (i = 0;i < nn;i++) { - if (p[i] < sizeof(cspace_available)) { + if ((unsigned int)p[i] < sizeof(cspace_available)) { cspace_available[p[i]] = 1; } } |