diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-01-04 16:11:06 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-01-04 18:59:07 +0000 |
commit | 5fe48dd2498953fc3df7f8f22655e91c77f97076 (patch) | |
tree | 2fea57ba3ff216d10bca32b013ecb73e2c6fe499 /base/gsicc_create.c | |
parent | 063c0a1eface77cdc2c4e657599521c7146ec8ca (diff) | |
download | ghostpdl-5fe48dd2498953fc3df7f8f22655e91c77f97076.tar.gz |
Squash warnings: MSVC ones.
Tweak the code to avoid the warnings seen in the MSVC debug build of
gs.
Mostly adding a few casts to make type changes explicit (and hence
avoid the "casting from int to double might lose data" etc warnings).
Reorder the headers in a couple of places to avoid offsetof being
redefined in a system header warnings.
Diffstat (limited to 'base/gsicc_create.c')
-rw-r--r-- | base/gsicc_create.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/gsicc_create.c b/base/gsicc_create.c index 0cf4c126c..57511c15d 100644 --- a/base/gsicc_create.c +++ b/base/gsicc_create.c @@ -439,15 +439,15 @@ gsicc_vec_to_mlut(gs_vector3 *vec, unsigned short *clut) *curr_ptr ++= 0; *curr_ptr ++= 0; *curr_ptr ++= 0; - temp = vec->u * 65535; + temp = (int)(vec->u * 65535); if (temp > 65535) temp = 65535; if (temp < 0) temp = 0; *curr_ptr ++= temp; - temp = vec->v * 65535; + temp = (int)(vec->v * 65535); if (temp > 65535) temp = 65535; if (temp < 0) temp = 0; *curr_ptr ++= temp; - temp = vec->w * 65535; + temp = (int)(vec->w * 65535); if (temp > 65535) temp = 65535; if (temp < 0) temp = 0; *curr_ptr ++= temp; @@ -1560,9 +1560,9 @@ create_lutAtoBprofile(unsigned char **pp_buffer_in, icHeader *header, d50_cieA[2] = D50_Z; } else { /* Need to do final scaling to ICC CIEXYZ range */ - d50_cieA[0] = D50_X / (1.0 + (32767.0/32768.0)) ; - d50_cieA[1] = D50_Y / (1.0 + (32767.0/32768.0)); - d50_cieA[2] = D50_Z / (1.0 + (32767.0/32768.0)); + d50_cieA[0] = (float)(D50_X / (1.0 + (32767.0/32768.0))); + d50_cieA[1] = (float)(D50_Y / (1.0 + (32767.0/32768.0))); + d50_cieA[2] = (float)(D50_Z / (1.0 + (32767.0/32768.0))); } matrixmult(&(d50_cieA[0]), 3, 1, &(lmn_vector[0]), 1, 3, &(lutatobparts->matrix->cu.u)); |