From 173ad641aa2891d7ca0d6b48683c8eb50158b9e7 Mon Sep 17 00:00:00 2001 From: Luis Ibanez Date: Wed, 2 Jun 2010 04:16:09 +0000 Subject: [PATCH] ENH: Fixing compilation warnings on gcc 4.4. --- codec/image_to_j2k.c | 1 - test_Free_image_V2_tile_handling/test2_decoder.c | 6 +++--- test_Free_image_V2_tile_handling/test2_encoder.c | 2 +- test_V2_tile_handling/test_decoder.c | 1 + test_V2_tile_handling/test_encoder.c | 8 +++++++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index 1a7bb2ac..e0e567c3 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -493,7 +493,6 @@ void cinema_parameters(opj_cparameters_t *parameters){ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){ int i; float temp_rate; - opj_poc_t *POC = NULL; switch (parameters->cp_cinema){ case CINEMA2K_24: diff --git a/test_Free_image_V2_tile_handling/test2_decoder.c b/test_Free_image_V2_tile_handling/test2_decoder.c index aee4949a..41348308 100644 --- a/test_Free_image_V2_tile_handling/test2_decoder.c +++ b/test_Free_image_V2_tile_handling/test2_decoder.c @@ -124,11 +124,11 @@ int main (int argc,char * argv []) OPJ_INT32 l_min_x, l_min_y, l_max_x, l_max_y; OPJ_CODEC_FORMAT l_codec_format; FIBITMAP * l_bitmap; - char * l_image_data; + unsigned char * l_image_data; OPJ_INT32 l_req_x,l_req_y; OPJ_UINT32 l_image_width,l_image_height,l_image_boundary,l_offset; - char * l_tile_ptr [3]; - char * l_line_ptr, * l_current_ptr; + unsigned char * l_tile_ptr [3]; + unsigned char * l_line_ptr, * l_current_ptr; OPJ_UINT32 i,j; if diff --git a/test_Free_image_V2_tile_handling/test2_encoder.c b/test_Free_image_V2_tile_handling/test2_encoder.c index 15d1136c..cf54a3a2 100644 --- a/test_Free_image_V2_tile_handling/test2_encoder.c +++ b/test_Free_image_V2_tile_handling/test2_encoder.c @@ -121,7 +121,7 @@ int main (int argc, char * argv []) OPJ_CODEC_FORMAT l_codec_format; FIBITMAP * l_bitmap; FREE_IMAGE_FORMAT l_input_format; - char * l_image_data; + unsigned char * l_image_data; char * l_input_file,*l_output_file; if (argc != 6) diff --git a/test_V2_tile_handling/test_decoder.c b/test_V2_tile_handling/test_decoder.c index de7e0aba..5f88876d 100644 --- a/test_V2_tile_handling/test_decoder.c +++ b/test_V2_tile_handling/test_decoder.c @@ -29,6 +29,7 @@ //#define _PROFILE #include "openjpeg.h" +#include "stdlib.h" #ifdef WIN32 #include #endif diff --git a/test_V2_tile_handling/test_encoder.c b/test_V2_tile_handling/test_encoder.c index f96a7886..abdcaf20 100644 --- a/test_V2_tile_handling/test_encoder.c +++ b/test_V2_tile_handling/test_encoder.c @@ -26,6 +26,8 @@ #define USE_OPJ_DEPRECATED #include "openjpeg.h" +#include "stdlib.h" + /* set this macro to enable profiling for the given test */ /* warning : in order to be effective, openjpeg must have been built with profiling enabled !! */ //#define _PROFILE @@ -94,6 +96,7 @@ int main () OPJ_UINT32 l_nb_tiles = (IMAGE_WIDTH/TILE_WIDTH) * (IMAGE_HEIGHT/TILE_HEIGHT); OPJ_UINT32 l_data_size = TILE_WIDTH * TILE_HEIGHT * NUM_COMPS * (COMP_PREC/8); +#ifdef USING_MCT const OPJ_FLOAT32 l_mct [] = { 1 , 0 , 0 , @@ -105,6 +108,7 @@ int main () { 128 , 128 , 128 }; +#endif opj_image_cmptparm_t * l_current_param_ptr; OPJ_UINT32 i; @@ -185,7 +189,9 @@ int main () /* l_param.tp_flag = 0; */ /* if we are using mct */ - /* opj_set_MCT(&l_param,l_mct,l_offsets,NUM_COMPS); */ +#ifdef USING_MCT + opj_set_MCT(&l_param,l_mct,l_offsets,NUM_COMPS); +#endif /* image definition */