diff options
| author | Stefan Weil <sw@weilnetz.de> | 2015-10-07 11:58:11 +0200 |
|---|---|---|
| committer | Stefan Weil <sw@weilnetz.de> | 2015-10-07 20:53:57 +0200 |
| commit | c8ae3c522552271f426eaa9c6d158a72e9c5f26f (patch) | |
| tree | f1694f45b7bddcbd63e9480c913a76e7410cbe14 /src/bin/jp2/convertpng.c | |
| parent | 07f65540b54f83919447ea8e515b95a4777d8ae0 (diff) | |
Fix warnings for C++
g++ complains about invalid conversions like these ones:
error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
error: invalid conversion from ‘void*’ to ‘opj_precision* {aka opj_prec*}’ [-fpermissive]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'src/bin/jp2/convertpng.c')
| -rw-r--r-- | src/bin/jp2/convertpng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/jp2/convertpng.c b/src/bin/jp2/convertpng.c index 0999edbf..8d117412 100644 --- a/src/bin/jp2/convertpng.c +++ b/src/bin/jp2/convertpng.c @@ -211,7 +211,7 @@ opj_image_t *pngtoimage(const char *read_idf, opj_cparameters_t * params) image->x1 = (OPJ_UINT32)(image->x0 + (width - 1) * (OPJ_UINT32)params->subsampling_dx + 1 + image->x0); image->y1 = (OPJ_UINT32)(image->y0 + (height - 1) * (OPJ_UINT32)params->subsampling_dy + 1 + image->y0); - row32s = malloc((size_t)width * nr_comp * sizeof(OPJ_INT32)); + row32s = (OPJ_INT32 *)malloc((size_t)width * nr_comp * sizeof(OPJ_INT32)); if(row32s == NULL) goto fin; /* Set alpha channel */ |
