From e3981542128142fabd46cd7bb05c0f61a59c7396 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Tue, 8 Nov 2005 16:15:40 +0000 Subject: [PATCH] small changes to remove warnings related to signedness --- libopenjpeg/j2k.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index 976642c5..9e020db1 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -988,7 +988,7 @@ j2k_encode(j2k_image_t * img, j2k_cp_t * cp, char *output, int len, char *index) { int tileno, compno, layno, resno, precno, pack_nb, x, y; - char *dest = NULL; + unsigned char *dest = NULL; FILE *INDEX = NULL; FILE *f = NULL; @@ -1002,7 +1002,7 @@ j2k_encode(j2k_image_t * img, j2k_cp_t * cp, char *output, fprintf(stderr, "failed to open %s for writing\n", output); return 1; } - dest = (char *) malloc(len); + dest = (unsigned char *) malloc(len); cio_init(dest, len); } @@ -1062,7 +1062,7 @@ j2k_encode(j2k_image_t * img, j2k_cp_t * cp, char *output, if (cp->intermed_file == 1) { /* new dest for each tile */ free(dest); - dest = (char *) malloc(len); + dest = (unsigned char *) malloc(len); cio_init(dest, len); } j2k_curtileno = tileno; @@ -1124,7 +1124,7 @@ j2k_encode(j2k_image_t * img, j2k_cp_t * cp, char *output, if (cp->intermed_file == 1) { free(dest); - dest = (char *) malloc(len); + dest = (unsigned char *) malloc(len); cio_init(dest, len); }