diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-07-29 08:50:55 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2011-07-29 08:50:55 +0000 |
| commit | 5743cca5f851a6c33462f66c2006ca5fc78f3c12 (patch) | |
| tree | 79b6e8fa9323b1213d64019b2b7acfe364e81543 /libopenjpeg/jp2.c | |
| parent | e716a316f60f66cd5a6fb07b88b2cb8b9c815cec (diff) | |
solve some obvious warnings for WIN platform, increase number of warning reported on the dashboard, correct last warnings with gcc 4.4 (-Wall)
Diffstat (limited to 'libopenjpeg/jp2.c')
| -rw-r--r-- | libopenjpeg/jp2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index ffbf270f..39d48a5f 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -403,8 +403,8 @@ static opj_bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio, */ if(color->jp2_pclr) return OPJ_FALSE; - nr_entries = cio_read(cio, 2); /* NE */ - nr_channels = cio_read(cio, 1);/* NPC */ + nr_entries = (unsigned short)cio_read(cio, 2); /* NE */ + nr_channels = (unsigned short)cio_read(cio, 1);/* NPC */ entries = (unsigned int*) opj_malloc(nr_channels * nr_entries * sizeof(unsigned int)); @@ -460,7 +460,7 @@ static opj_bool jp2_read_cmap(opj_jp2_t *jp2, opj_cio_t *cio, for(i = 0; i < nr_channels; ++i) { - cmap[i].cmp = cio_read(cio, 2); + cmap[i].cmp = (unsigned short)cio_read(cio, 2); cmap[i].mtyp = cio_read(cio, 1); cmap[i].pcol = cio_read(cio, 1); @@ -516,7 +516,7 @@ static opj_bool jp2_read_cdef(opj_jp2_t *jp2, opj_cio_t *cio, */ if(color->jp2_cdef) return OPJ_FALSE; - if((n = cio_read(cio, 2)) == 0) return OPJ_FALSE; /* szukw000: FIXME */ + if((n = (unsigned short)cio_read(cio, 2)) == 0) return OPJ_FALSE; /* szukw000: FIXME */ info = (opj_jp2_cdef_info_t*) opj_malloc(n * sizeof(opj_jp2_cdef_info_t)); @@ -527,9 +527,9 @@ static opj_bool jp2_read_cdef(opj_jp2_t *jp2, opj_cio_t *cio, for(i = 0; i < n; ++i) { - info[i].cn = cio_read(cio, 2); - info[i].typ = cio_read(cio, 2); - info[i].asoc = cio_read(cio, 2); + info[i].cn = (unsigned short)cio_read(cio, 2); + info[i].typ = (unsigned short)cio_read(cio, 2); + info[i].asoc = (unsigned short)cio_read(cio, 2); } return OPJ_TRUE; |
