summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2011-08-12 18:19:59 +0100
committerChris Liddell <chris.liddell@artifex.com>2011-08-12 18:19:59 +0100
commit5d45b3c3bc664f7e8a81e85c812dd100543d4cd9 (patch)
tree6ea94f08c914238ffff278b2aa593706bc62aa45
parent78fe552263a621714c8335ec46f4493121856192 (diff)
Bug 690054: fix a bunch of warnings in base/
A couple were real functional problems (left-overs from old API versions), the rest were the usual benign but irritating noise. No cluster differences.
-rw-r--r--gs/base/gdevimdi.c10
-rw-r--r--gs/base/gdevokii.c2
-rw-r--r--gs/base/gdevphex.c13
-rw-r--r--gs/base/gdevsunr.c2
-rw-r--r--gs/base/gdevtsep.c11
-rw-r--r--gs/base/gdevwts.c2
6 files changed, 18 insertions, 22 deletions
diff --git a/gs/base/gdevimdi.c b/gs/base/gdevimdi.c
index 472ea092a..9061eeb96 100644
--- a/gs/base/gdevimdi.c
+++ b/gs/base/gdevimdi.c
@@ -88,16 +88,6 @@ const gx_device_imdi gs_imdi_device =
3, 24, 255, 255, 256, 256, imdi_print_page)
};
-static double incurve(void *ctx, int ch, double val)
-{
- return val;
-}
-
-static double outcurve(void *ctx, int ch, double val)
-{
- return val;
-}
-
/*
* Open IMDI device.
* Load ICC device link profile (to map sRGB to FOGRA CMYK).
diff --git a/gs/base/gdevokii.c b/gs/base/gdevokii.c
index 66d2e136f..6372fa3ee 100644
--- a/gs/base/gdevokii.c
+++ b/gs/base/gdevokii.c
@@ -258,7 +258,7 @@ okiibm_output_run(byte *data, int count, int y_mult,
int xcount = count / y_mult;
fputc(033, prn_stream);
- fputc((int)("KLYZ"[start_graphics]), prn_stream);
+ fputc((int)("KLYZ"[(int)start_graphics]), prn_stream);
fputc(xcount & 0xff, prn_stream);
fputc(xcount >> 8, prn_stream);
if ( !pass )
diff --git a/gs/base/gdevphex.c b/gs/base/gdevphex.c
index f451be3f4..63c7af448 100644
--- a/gs/base/gdevphex.c
+++ b/gs/base/gdevphex.c
@@ -925,8 +925,8 @@ typedef struct {
static int photoex_open( gx_device *pdev );
static int photoex_print_page( PDEV *dev, FILE *prn_stream );
-static CINX photoex_map_rgb_color( DEV *dev, CVAL r, CVAL g, CVAL b );
-static int photoex_map_color_rgb( DEV *dev, CINX index, CVAL prgb[3] );
+static CINX photoex_map_rgb_color( DEV *dev, const CVAL prgb[] );
+static int photoex_map_color_rgb( DEV *dev, CINX index, CVAL prgb[] );
static int photoex_get_params( DEV *dev, PLIST *plist );
static int photoex_put_params( DEV *dev, PLIST *plist );
@@ -1004,7 +1004,7 @@ static const HFUNCS htable[ MAXHTONE ] = {
* define here are the photoex_ functions.
*/
-static gx_device_procs photoex_device_procs = prn_color_params_procs(
+static const gx_device_procs photoex_device_procs = prn_color_params_procs(
photoex_open, /* Opens the device */
gdev_prn_output_page,
@@ -1366,8 +1366,9 @@ float margins[ 4 ]; /* L, B, R, T */
* color_index being at least 32 bit !!!
*/
-static CINX photoex_map_rgb_color( DEV *dev, CVAL r, CVAL g, CVAL b )
+static CINX photoex_map_rgb_color( DEV *dev, const CVAL prgb[] )
{
+CVAL r = prgb[0], g = prgb[1], b = prgb[2];
int c, y, m, k;
int a, s, f;
EDEV *edev;
@@ -1433,7 +1434,7 @@ int i;
* It does not do any ink transfer compensation, colour compensation etc.
*/
-static int photoex_map_color_rgb( DEV *dev, CINX index, CVAL prgb[3] )
+static int photoex_map_color_rgb( DEV *dev, CINX index, CVAL prgb[] )
{
uint c, m, y, k;
CVAL r, g, b;
@@ -2355,7 +2356,7 @@ static void PackLine( byte *input, int pixnum, int lev_on, int step,
RAWLINE *line )
{
byte bits;
-char *result;
+byte *result;
int i, j, k;
result = line->data;
diff --git a/gs/base/gdevsunr.c b/gs/base/gdevsunr.c
index 0bdca6eb1..e1ac5a8c0 100644
--- a/gs/base/gdevsunr.c
+++ b/gs/base/gdevsunr.c
@@ -57,7 +57,7 @@ sunhmono_print_page(gx_device_printer * pdev, FILE * prn_stream)
/* Output bytes have to be padded to 16 bits. */
int rasLineBytes = ROUND_UP(gsLineBytes, 2);
int lineCnt;
- char *lineStorage; /* Allocated for passing storage to gdev_prn_get_bits() */
+ byte *lineStorage; /* Allocated for passing storage to gdev_prn_get_bits() */
byte *data;
sun_rasterfile_t ras;
int code = 0;
diff --git a/gs/base/gdevtsep.c b/gs/base/gdevtsep.c
index 5497c3e18..aef616c0e 100644
--- a/gs/base/gdevtsep.c
+++ b/gs/base/gdevtsep.c
@@ -385,10 +385,13 @@ static dev_proc_put_params(tiffsep_put_params);
static dev_proc_print_page(tiffsep_print_page);
static dev_proc_get_color_mapping_procs(tiffsep_get_color_mapping_procs);
static dev_proc_get_color_comp_index(tiffsep_get_color_comp_index);
-static dev_proc_encode_color(tiffsep_encode_color);
-static dev_proc_decode_color(tiffsep_decode_color);
+#if USE_COMPRESSED_ENCODING
static dev_proc_encode_color(tiffsep_encode_compressed_color);
static dev_proc_decode_color(tiffsep_decode_compressed_color);
+#else
+static dev_proc_encode_color(tiffsep_encode_color);
+#endif
+static dev_proc_decode_color(tiffsep_decode_color);
static dev_proc_update_spot_equivalent_colors(tiffsep_update_spot_equivalent_colors);
static dev_proc_ret_devn_params(tiffsep_ret_devn_params);
static dev_proc_open_device(tiffsep1_prn_open);
@@ -697,6 +700,7 @@ tiffsep_get_color_mapping_procs(const gx_device * dev)
return &tiffsep_cm_procs;
}
+#if USE_COMPRESSED_ENCODING
/*
* Encode a list of colorant values into a gx_color_index_value.
* With 64 bit gx_color_index values, we compress the colorant values. This
@@ -719,7 +723,7 @@ tiffsep_decode_compressed_color(gx_device * dev, gx_color_index color, gx_color_
return devn_decode_compressed_color(dev, color, out,
&(((tiffsep_device *)dev)->devn_params));
}
-
+#else
/*
* Encode a list of colorant values into a gx_color_index_value.
* With 32 bit gx_color_index values, we simply pack values.
@@ -739,6 +743,7 @@ tiffsep_encode_color(gx_device *dev, const gx_color_value colors[])
}
return (color == gx_no_color_index ? color ^ 1 : color);
}
+#endif
/*
* Decode a gx_color_index value back to a list of colorant values.
diff --git a/gs/base/gdevwts.c b/gs/base/gdevwts.c
index aae5a08d6..fe3e7a268 100644
--- a/gs/base/gdevwts.c
+++ b/gs/base/gdevwts.c
@@ -150,7 +150,7 @@ const gx_device_wtsimdi gs_wtsimdi_device = {
3, 24, 255, 255, 256, 256, wtsimdi_print_page)
};
-#if DUMMY_WTS_HALFTONE_LINE
+#if defined(DUMMY_WTS_HALFTONE_LINE) && DUMMY_WTS_HALFTONE_LINE == 1
static void
wts_halftone_line(void **wts, int y, int width, int n_planes,
long band_offset_x, long band_offset_y,