From 54214fb65fdc7af6b505ed0b924ea5d44d861ebf Mon Sep 17 00:00:00 2001 From: Francois-Olivier Devaux Date: Wed, 24 Mar 2010 11:20:45 +0000 Subject: Code improvements using 'g++-4.4.0' to trace the code (v1.4). Thanks to Winfried for this patch. --- codec/compat/getopt.c | 2 +- codec/compat/getopt.h | 2 +- codec/convert.c | 8 ++++---- codec/image_to_j2k.c | 2 +- codec/j2k_to_image.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'codec') diff --git a/codec/compat/getopt.c b/codec/compat/getopt.c index f434924b..5e444d39 100644 --- a/codec/compat/getopt.c +++ b/codec/compat/getopt.c @@ -49,7 +49,7 @@ const char *optarg; /* argument associated with option */ typedef struct option { - char *name; + const char *name; int has_arg; int *flag; int val; diff --git a/codec/compat/getopt.h b/codec/compat/getopt.h index 3477e069..f84fbc06 100644 --- a/codec/compat/getopt.h +++ b/codec/compat/getopt.h @@ -5,7 +5,7 @@ typedef struct option { - char *name; + const char *name; int has_arg; int *flag; int val; diff --git a/codec/convert.c b/codec/convert.c index a9ffb0da..182477b3 100644 --- a/codec/convert.c +++ b/codec/convert.c @@ -1463,7 +1463,7 @@ int imagetotif(opj_image_t * image, const char *outfile) { unsigned char *dat8; int i, ssize; ssize = TIFFStripSize(tif); - dat8 = buf; + dat8 = (unsigned char*)buf; if (image->comps[0].prec == 8){ for (i=0; icomps[0].prec == 8){ for (i=0; i