diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2019-10-31 10:17:09 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2019-10-31 10:33:52 +0000 |
commit | f1fd4a73480c5a2f900b1541b45a62ffcc75e12d (patch) | |
tree | baef288b8f803cab427c36d833e748dcff046571 /contrib/pcl3/eprn | |
parent | 67a101f3eb888bc651cc13bfb06280a669a84967 (diff) | |
download | ghostpdl-f1fd4a73480c5a2f900b1541b45a62ffcc75e12d.tar.gz |
Fix warnings when building contrib on windows.
MSVC is much more sensitive to casting types than gcc is, it
seems. Accordingly avoid making doubles when we want floats, and
make all casts down to int (or byte) explicit.
Diffstat (limited to 'contrib/pcl3/eprn')
-rw-r--r-- | contrib/pcl3/eprn/mediasize.c | 6 | ||||
-rw-r--r-- | contrib/pcl3/eprn/mediasize.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/contrib/pcl3/eprn/mediasize.c b/contrib/pcl3/eprn/mediasize.c index 8cfe3d916..21c6a26fc 100644 --- a/contrib/pcl3/eprn/mediasize.c +++ b/contrib/pcl3/eprn/mediasize.c @@ -100,11 +100,11 @@ static const ms_SizeDescription list[] = { /* Media called by this name may vary up to 0.5" in dimension (PPD 4.3). */ {sn(A4), {210*BP_PER_MM, 297*BP_PER_MM}}, {sn(Folio), {210*BP_PER_MM, 330*BP_PER_MM}}, - {sn(Quarto), {8.5*BP_PER_IN, 10.83*BP_PER_IN}}, /* 215.9 x 275.1 mm + {sn(Quarto), {8.5f*BP_PER_IN, 10.83f*BP_PER_IN}}, /* 215.9 x 275.1 mm PPD 4.3 uses bp values for the definition, but this does not agree with the mm values it specifies. The inch specifications fit. */ - {sn(Letter), {8.5*BP_PER_IN, 11.0*BP_PER_IN}}, /* 215.9 x 279.4 mm */ - {sn(Legal), {8.5*BP_PER_IN, 14.0*BP_PER_IN}}, /* 215.9 x 355.6 mm */ + {sn(Letter), {8.5f*BP_PER_IN, 11.0f*BP_PER_IN}}, /* 215.9 x 279.4 mm */ + {sn(Legal), {8.5f*BP_PER_IN, 14.0f*BP_PER_IN}}, /* 215.9 x 355.6 mm */ {sn(EnvKaku3), {216*BP_PER_MM, 277*BP_PER_MM}}, {sn(SuperA), {227*BP_PER_MM, 356*BP_PER_MM}}, {sn(ARCHA), {9*BP_PER_IN, 12*BP_PER_IN}}, /* 228.6 x 304.8 mm */ diff --git a/contrib/pcl3/eprn/mediasize.h b/contrib/pcl3/eprn/mediasize.h index 8553b6eaa..4033ad218 100644 --- a/contrib/pcl3/eprn/mediasize.h +++ b/contrib/pcl3/eprn/mediasize.h @@ -20,10 +20,10 @@ All these macros resolve to floating point numbers. */ /* Millimetres per inch */ -#define MM_PER_IN 25.4 +#define MM_PER_IN 25.4f /* Big points (units in PostScript's default user space) per inch */ -#define BP_PER_IN 72.0 +#define BP_PER_IN 72.0f /* Big points per millimetre */ #define BP_PER_MM (BP_PER_IN/MM_PER_IN) |