diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2010-03-24 11:20:45 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2010-03-24 11:20:45 +0000 |
| commit | 54214fb65fdc7af6b505ed0b924ea5d44d861ebf (patch) | |
| tree | a069760c32f43d0a506963eb3f8b5b2e08e8aace /codec | |
| parent | 3ecae15da2f4f42531d007c65997248c616e40f3 (diff) | |
Code improvements using 'g++-4.4.0' to trace the code (v1.4). Thanks to Winfried for this patch.
Diffstat (limited to 'codec')
| -rw-r--r-- | codec/compat/getopt.c | 2 | ||||
| -rw-r--r-- | codec/compat/getopt.h | 2 | ||||
| -rw-r--r-- | codec/convert.c | 8 | ||||
| -rw-r--r-- | codec/image_to_j2k.c | 2 | ||||
| -rw-r--r-- | codec/j2k_to_image.c | 2 |
5 files changed, 8 insertions, 8 deletions
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; i<ssize-2; i+=3) { // 8 bits per pixel int r = 0,g = 0,b = 0; @@ -1658,7 +1658,7 @@ int imagetotif(opj_image_t * image, const char *outfile) { for (strip = 0; strip < TIFFNumberOfStrips(tif); strip++) { unsigned char *dat8; int i; - dat8 = buf; + dat8 = (unsigned char*)buf; if (image->comps[0].prec == 8){ for (i=0; i<TIFFStripSize(tif); i+=1) { // 8 bits per pixel if(index < imgsize){ @@ -1799,7 +1799,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters) unsigned char *dat8; int i, ssize; ssize = TIFFReadEncodedStrip(tif, strip, buf, strip_size); - dat8 = buf; + dat8 = (unsigned char*)buf; if (Info.tiBps==12){ for (i=0; i<ssize; i+=9) { /*12 bits per pixel*/ @@ -1895,7 +1895,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters) unsigned char *dat8; int i, ssize; ssize = TIFFReadEncodedStrip(tif, strip, buf, strip_size); - dat8 = buf; + dat8 = (unsigned char*)buf; if (Info.tiBps==12){ for (i=0; i<ssize; i+=3) { /* 12 bits per pixel*/ diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index f0314562..75d15710 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -910,7 +910,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters, while (sscanf(s, "T%d=%d,%d,%d,%d,%d,%4s", &POC[numpocs].tile, &POC[numpocs].resno0, &POC[numpocs].compno0, &POC[numpocs].layno1, &POC[numpocs].resno1, - &POC[numpocs].compno1, &POC[numpocs].progorder) == 7) { + &POC[numpocs].compno1, POC[numpocs].progorder) == 7) { POC[numpocs].prg1 = give_progression(POC[numpocs].progorder); numpocs++; while (*s && *s != '/') { diff --git a/codec/j2k_to_image.c b/codec/j2k_to_image.c index 72245b09..d93c417b 100644 --- a/codec/j2k_to_image.c +++ b/codec/j2k_to_image.c @@ -73,7 +73,7 @@ typedef struct img_folder{ /** The directory path of the folder containing input images*/ char *imgdirpath; /** Output format*/ - char *out_format; + const char *out_format; /** Enable option*/ char set_imgdir; /** Enable Cod Format for output*/ |
