summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-03 12:00:24 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-03 12:00:24 +0000
commit11f402b44ae63295663737e355d1319b6e50f84b (patch)
tree30bde70a5dd9a73da759b97300848581f3b7e825 /src
parent18049fe3e0dadd6765f030e71d647d6865e8625d (diff)
[trunk] Remove easy to fix warnings about conversion
Diffstat (limited to 'src')
-rw-r--r--src/bin/common/color.c3
-rw-r--r--src/bin/jp2/opj_decompress.c2
-rw-r--r--src/lib/openjp2/dwt.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/bin/common/color.c b/src/bin/common/color.c
index f18eb801..6cb98497 100644
--- a/src/bin/common/color.c
+++ b/src/bin/common/color.c
@@ -388,7 +388,8 @@ fprintf(stderr,"%s:%d:color_apply_icc_profile\n\tcmsCreateTransform failed. "
if(image->numcomps > 2)/* RGB, RGBA */
{
unsigned short *inbuf, *outbuf, *in, *out;
- max = max_w * max_h; nr_samples = max * 3 * sizeof(unsigned short);
+ max = max_w * max_h;
+ nr_samples = (cmsUInt32Number)(max * 3 * sizeof(unsigned short));
in = inbuf = (unsigned short*)malloc(nr_samples);
out = outbuf = (unsigned short*)malloc(nr_samples);
diff --git a/src/bin/jp2/opj_decompress.c b/src/bin/jp2/opj_decompress.c
index b2e4e83c..dd1a0775 100644
--- a/src/bin/jp2/opj_decompress.c
+++ b/src/bin/jp2/opj_decompress.c
@@ -271,7 +271,7 @@ static int infile_format(const char *fname)
const char *s, *magic_s;
int ext_format, magic_format;
unsigned char buf[12];
- unsigned int l_nb_read;
+ OPJ_SIZE_T l_nb_read;
reader = fopen(fname, "rb");
diff --git a/src/lib/openjp2/dwt.c b/src/lib/openjp2/dwt.c
index 7d87a9f8..c617ffcf 100644
--- a/src/lib/openjp2/dwt.c
+++ b/src/lib/openjp2/dwt.c
@@ -404,7 +404,7 @@ INLINE OPJ_BOOL opj_dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_fun
rw = l_cur_res->x1 - l_cur_res->x0;
rh = l_cur_res->y1 - l_cur_res->y0;
- l_data_size = opj_dwt_max_resolution( tilec->resolutions,tilec->numresolutions) * sizeof(OPJ_INT32);
+ l_data_size = opj_dwt_max_resolution( tilec->resolutions,tilec->numresolutions) * (OPJ_UINT32)sizeof(OPJ_INT32);
bj = (OPJ_INT32*)opj_malloc(l_data_size);
if (! bj) {
return OPJ_FALSE;