[trunk] Remove some warnings about missing prototypes (gcc)
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 15 Oct 2012 15:47:56 +0000 (15:47 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 15 Oct 2012 15:47:56 +0000 (15:47 +0000)
27 files changed:
src/bin/jp2/convert.c
src/bin/jp2/opj_compress.c
src/bin/jp2/opj_decompress.c
src/bin/jp2/opj_dump.c
src/bin/jpip/opj_jpip_compress.c
src/bin/mj2/opj_mj2_compress.c
src/bin/mj2/opj_mj2_decompress.c
src/bin/mj2/opj_mj2_wrap.c
src/lib/openjp2/function_list.h
src/lib/openjp2/mct.h
src/lib/openjp2/openjpeg.c
src/lib/openjp2/t1.h
src/lib/openjp3d/bio.h
src/lib/openjp3d/cio.c
src/lib/openjp3d/jp3d.c
src/lib/openjp3d/jp3d_lib.h
src/lib/openjp3d/mqc.h
src/lib/openjp3d/openjp3d.h
src/lib/openjp3d/raw.h
src/lib/openjp3d/tcd.c
src/lib/openmj2/jpt.c
tests/CMakeLists.txt
tests/compareRAWimages.c
tests/compare_dump_files.c
tests/j2k_random_tile_access.c
tests/test_tile_decoder.c
tests/test_tile_encoder.c

index 59af469b471798f6132129a79b76c0c617273a85..6cfa663c4150603a3b41f97ab78b8a6351a7aa55 100644 (file)
@@ -2921,7 +2921,7 @@ opj_image_t* rawtoimage(const char *filename, opj_cparameters_t *parameters, raw
   return rawtoimage_common(filename, parameters, raw_cp, OPJ_TRUE);
 }
 
-int imagetoraw_common(opj_image_t * image, const char *outfile, opj_bool big_endian)
+static int imagetoraw_common(opj_image_t * image, const char *outfile, opj_bool big_endian)
 {
        FILE *rawFile = NULL;
   size_t res;
index 4c1cbd835f6035e359c65ceb4e0f1714ff39d0dd..1824c03e00c9b7a6f07ffe1de6ad6cd9c2f16da5 100644 (file)
@@ -84,8 +84,8 @@ typedef struct img_folder{
        float *rates;
 }img_fol_t;
 
-void encode_help_display(void) {
-       fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
+static void encode_help_display(void) {
+       fprintf(stdout,"HELP for opj_compress\n----\n\n");
        fprintf(stdout,"- the -h option displays this help information on screen\n\n");
 
 /* UniPG>> */
@@ -325,7 +325,7 @@ void encode_help_display(void) {
        fprintf(stdout,"TotalDisto\n\n");
 }
 
-OPJ_PROG_ORDER give_progression(char progression[4]) {
+static OPJ_PROG_ORDER give_progression(const char progression[4]) {
        if(strncmp(progression, "LRCP", 4) == 0) {
                return LRCP;
        }
@@ -345,7 +345,7 @@ OPJ_PROG_ORDER give_progression(char progression[4]) {
        return PROG_UNKNOWN;
 }
 
-unsigned int get_num_images(char *imgdirpath){
+static unsigned int get_num_images(char *imgdirpath){
        DIR *dir;
        struct dirent* content;
        unsigned int num_images = 0;
@@ -367,7 +367,7 @@ unsigned int get_num_images(char *imgdirpath){
        return num_images;
 }
 
-int load_images(dircnt_t *dirptr, char *imgdirpath){
+static int load_images(dircnt_t *dirptr, char *imgdirpath){
        DIR *dir;
        struct dirent* content;
        int i = 0;
@@ -392,7 +392,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
        return 0;
 }
 
-int get_file_format(char *filename) {
+static int get_file_format(char *filename) {
        unsigned int i;
        static const char *extension[] = {
     "pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
@@ -412,14 +412,14 @@ int get_file_format(char *filename) {
        return -1;
 }
 
-char * get_file_name(char *name){
+static char * get_file_name(char *name){
        char *fname;
        fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char));
        fname= strtok(name,".");
        return fname;
 }
 
-char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
+static char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
        char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
   char *temp_p, temp1[OPJ_PATH_LEN]="";
 
@@ -462,7 +462,7 @@ static int initialise_4K_poc(opj_poc_t *POC, int numres){
        return 2;
 }
 
-void cinema_parameters(opj_cparameters_t *parameters){
+static void cinema_parameters(opj_cparameters_t *parameters){
        parameters->tile_size_on = OPJ_FALSE;
        parameters->cp_tdx=1;
        parameters->cp_tdy=1;
@@ -495,7 +495,7 @@ void cinema_parameters(opj_cparameters_t *parameters){
 
 }
 
-void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
+static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
        int i;
        float temp_rate;
 
@@ -580,7 +580,7 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_
 
 /* ------------------------------------------------------------------------------------ */
 
-int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
+static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
                                                                                                        img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
        int i, j, totlen, c;
        opj_option_t long_option[]={
@@ -1535,21 +1535,21 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
 /**
 sample error callback expecting a FILE* client object
 */
-void error_file_callback(const char *msg, void *client_data) {
+static void error_file_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_file_callback(const char *msg, void *client_data) {
+static void warning_file_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting a FILE* client object
 */
-void info_file_callback(const char *msg, void *client_data) {
+static void info_file_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[INFO] %s", msg);
 }
@@ -1557,28 +1557,28 @@ void info_file_callback(const char *msg, void *client_data) {
 /**
 sample error debug callback expecting no client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[ERROR] %s", msg);
 }
 /**
 sample warning debug callback expecting no client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting no client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[INFO] %s", msg);
 }
 
 /* -------------------------------------------------------------------------- */
 /**
- * IMAGE_TO_J2K MAIN
+ * OPJ_COMPRESS MAIN
  */
 /* -------------------------------------------------------------------------- */
 int main(int argc, char **argv) {
index 7edb3c9b477262b71e14ccf4671abcfdc573daae..ac5e79c34a0cb5b0d886d35c73a89e162cf120ce 100644 (file)
@@ -97,8 +97,8 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
 int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
 
 /* -------------------------------------------------------------------------- */
-void decode_help_display(void) {
-       fprintf(stdout,"HELP for j2k_to_image\n----\n\n");
+static void decode_help_display(void) {
+       fprintf(stdout,"HELP for opj_decompress\n----\n\n");
        fprintf(stdout,"- the -h option displays this help information on screen\n\n");
 
 /* UniPG>> */
@@ -648,28 +648,28 @@ int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsi
 /**
 sample error callback expecting a FILE* client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting no client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[INFO] %s", msg);
 }
 
 /* -------------------------------------------------------------------------- */
 /**
- * J2K_TO_IMAGE MAIN
+ * OPJ_DECOMPRESS MAIN
  */
 /* -------------------------------------------------------------------------- */
 int main(int argc, char **argv)
@@ -802,7 +802,7 @@ int main(int argc, char **argv)
 
                /* Read the main header of the codestream and if necessary the JP2 boxes*/
                if(! opj_read_header(l_stream, l_codec, &image)){
-                       fprintf(stderr, "ERROR -> j2k_to_image: failed to read the header\n");
+                       fprintf(stderr, "ERROR -> opj_decompress: failed to read the header\n");
                        opj_stream_destroy(l_stream);
                        fclose(fsrc);
                        opj_destroy_codec(l_codec);
@@ -814,7 +814,7 @@ int main(int argc, char **argv)
                        /* Optional if you want decode the entire image */
                        if (!opj_set_decode_area(l_codec, image, parameters.DA_x0,
                                        parameters.DA_y0, parameters.DA_x1, parameters.DA_y1)){
-                               fprintf(stderr, "ERROR -> j2k_to_image: failed to set the decoded area\n");
+                               fprintf(stderr, "ERROR -> opj_decompress: failed to set the decoded area\n");
                                opj_stream_destroy(l_stream);
                                opj_destroy_codec(l_codec);
                                opj_image_destroy(image);
@@ -824,7 +824,7 @@ int main(int argc, char **argv)
 
                        /* Get the decoded image */
                        if (!(opj_decode(l_codec, l_stream, image) && opj_end_decompress(l_codec,       l_stream))) {
-                               fprintf(stderr,"ERROR -> j2k_to_image: failed to decode image!\n");
+                               fprintf(stderr,"ERROR -> opj_decompress: failed to decode image!\n");
                                opj_destroy_codec(l_codec);
                                opj_stream_destroy(l_stream);
                                opj_image_destroy(image);
@@ -836,7 +836,7 @@ int main(int argc, char **argv)
 
                        /* It is just here to illustrate how to use the resolution after set parameters */
                        /*if (!opj_set_decoded_resolution_factor(l_codec, 5)) {
-                               fprintf(stderr, "ERROR -> j2k_to_image: failed to set the resolution factor tile!\n");
+                               fprintf(stderr, "ERROR -> opj_decompress: failed to set the resolution factor tile!\n");
                                opj_destroy_codec(l_codec);
                                opj_stream_destroy(l_stream);
                                opj_image_destroy(image);
@@ -845,7 +845,7 @@ int main(int argc, char **argv)
                        }*/
 
                        if (!opj_get_decoded_tile(l_codec, l_stream, image, parameters.tile_index)) {
-                               fprintf(stderr, "ERROR -> j2k_to_image: failed to decode tile!\n");
+                               fprintf(stderr, "ERROR -> opj_decompress: failed to decode tile!\n");
                                opj_destroy_codec(l_codec);
                                opj_stream_destroy(l_stream);
                                opj_image_destroy(image);
index 6c63c2cacfd877384ce538d6a80c65a737a0cad7..ca801d5aaaa8eba1f5fe65033144a6a23fead1d5 100644 (file)
@@ -84,8 +84,8 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
 int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
 
 /* -------------------------------------------------------------------------- */
-void decode_help_display(void) {
-       fprintf(stdout,"HELP for j2k_dump\n----\n\n");
+static void decode_help_display(void) {
+       fprintf(stdout,"HELP for opj_dump\n----\n\n");
        fprintf(stdout,"- the -h option displays this help information on screen\n\n");
 
 /* UniPG>> */
@@ -374,28 +374,28 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
 /**
 sample error debug callback expecting no client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[ERROR] %s", msg);
 }
 /**
 sample warning debug callback expecting no client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting no client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[INFO] %s", msg);
 }
 
 /* -------------------------------------------------------------------------- */
 /**
- * J2K_DUMP MAIN
+ * OPJ_DUMP MAIN
  */
 /* -------------------------------------------------------------------------- */
 int main(int argc, char *argv[])
@@ -533,7 +533,7 @@ int main(int argc, char *argv[])
 
                /* Setup the decoder decoding parameters using user parameters */
                if ( !opj_setup_decoder(l_codec, &parameters) ){
-                       fprintf(stderr, "ERROR -> j2k_dump: failed to setup the decoder\n");
+                       fprintf(stderr, "ERROR -> opj_dump: failed to setup the decoder\n");
                        opj_stream_destroy(l_stream);
                        fclose(fsrc);
                        opj_destroy_codec(l_codec);
@@ -543,7 +543,7 @@ int main(int argc, char *argv[])
 
                /* Read the main header of the codestream and if necessary the JP2 boxes*/
                if(! opj_read_header(l_stream, l_codec, &image)){
-                       fprintf(stderr, "ERROR -> j2k_dump: failed to read the header\n");
+                       fprintf(stderr, "ERROR -> opj_dump: failed to read the header\n");
                        opj_stream_destroy(l_stream);
                        fclose(fsrc);
                        opj_destroy_codec(l_codec);
index 6c5fd05fffb7c04dcdaaf00189ed35c0d17d487c..2ff3809e700c604b63c3acdc509ea2921fed5a37 100644 (file)
@@ -86,7 +86,7 @@ typedef struct img_folder{
        float *rates;
 }img_fol_t;
 
-void encode_help_display(void) {
+static void encode_help_display(void) {
        fprintf(stdout,"HELP for image_to_j2k\n----\n\n");
        fprintf(stdout,"- the -h option displays this help information on screen\n\n");
 
@@ -327,7 +327,7 @@ void encode_help_display(void) {
        fprintf(stdout,"TotalDisto\n\n");
 }
 
-OPJ_PROG_ORDER give_progression(char progression[4]) {
+static OPJ_PROG_ORDER give_progression(const char progression[4]) {
        if(strncmp(progression, "LRCP", 4) == 0) {
                return LRCP;
        }
@@ -347,7 +347,7 @@ OPJ_PROG_ORDER give_progression(char progression[4]) {
        return PROG_UNKNOWN;
 }
 
-unsigned int get_num_images(char *imgdirpath){
+static unsigned int get_num_images(char *imgdirpath){
        DIR *dir;
        struct dirent* content;
        unsigned int num_images = 0;
@@ -369,7 +369,7 @@ unsigned int get_num_images(char *imgdirpath){
        return num_images;
 }
 
-int load_images(dircnt_t *dirptr, char *imgdirpath){
+static int load_images(dircnt_t *dirptr, char *imgdirpath){
        DIR *dir;
        struct dirent* content;
        int i = 0;
@@ -394,7 +394,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
        return 0;
 }
 
-int get_file_format(char *filename) {
+static int get_file_format(char *filename) {
        unsigned int i;
        static const char *extension[] = {
     "pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "rawl", "tga", "png", "j2k", "jp2", "j2c", "jpc"
@@ -414,14 +414,14 @@ int get_file_format(char *filename) {
        return -1;
 }
 
-char * get_file_name(char *name){
+static char * get_file_name(char *name){
        char *fname;
        fname= (char*)opj_malloc(OPJ_PATH_LEN*sizeof(char));
        fname= strtok(name,".");
        return fname;
 }
 
-char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
+static char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_cparameters_t *parameters){
        char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
   char *temp_p, temp1[OPJ_PATH_LEN]="";
 
@@ -464,7 +464,7 @@ static int initialise_4K_poc(opj_poc_t *POC, int numres){
        return 2;
 }
 
-void cinema_parameters(opj_cparameters_t *parameters){
+static void cinema_parameters(opj_cparameters_t *parameters){
        parameters->tile_size_on = OPJ_FALSE;
        parameters->cp_tdx=1;
        parameters->cp_tdy=1;
@@ -497,7 +497,7 @@ void cinema_parameters(opj_cparameters_t *parameters){
 
 }
 
-void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
+static void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_fol_t *img_fol){
        int i;
        float temp_rate;
 
@@ -582,7 +582,7 @@ void cinema_setup_encoder(opj_cparameters_t *parameters,opj_image_t *image, img_
 
 /* ------------------------------------------------------------------------------------ */
 
-int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
+static int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
                                                                                                        img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
        int i, j, totlen, c;
        opj_option_t long_option[]={
@@ -1537,21 +1537,21 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
 /**
 sample error callback expecting a FILE* client object
 */
-void error_file_callback(const char *msg, void *client_data) {
+static void error_file_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_file_callback(const char *msg, void *client_data) {
+static void warning_file_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting a FILE* client object
 */
-void info_file_callback(const char *msg, void *client_data) {
+static void info_file_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[INFO] %s", msg);
 }
@@ -1559,21 +1559,21 @@ void info_file_callback(const char *msg, void *client_data) {
 /**
 sample error debug callback expecting no client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[ERROR] %s", msg);
 }
 /**
 sample warning debug callback expecting no client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting no client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[INFO] %s", msg);
 }
index fbf25fe3890e18da12b175bb4c8cd8021e20d0df..73ddcbe80b99966d9e48dac05131752408a48b48 100644 (file)
@@ -50,21 +50,21 @@ Size of memory first allocated for MOOV box
 /**
 sample error callback expecting a FILE* client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting a FILE* client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[INFO] %s", msg);
 }
@@ -72,7 +72,7 @@ void info_callback(const char *msg, void *client_data) {
 /* -------------------------------------------------------------------------- */
 
 
-void help_display()
+static void help_display()
 {
   fprintf(stdout,"HELP for frames_to_mj2\n----\n\n");
   fprintf(stdout,"- the -h option displays this help information on screen\n\n");
@@ -197,7 +197,7 @@ void help_display()
   fprintf(stdout,"TotalDisto\n\n");
 }
 
-OPJ_PROG_ORDER give_progression(char progression[5])
+static OPJ_PROG_ORDER give_progression(const char progression[5])
 {
   if (progression[0] == 'L' && progression[1] == 'R'
     && progression[2] == 'C' && progression[3] == 'P') {
index d4258ef13ebd7a6c7b238bd88d3a224095c7f259..ee312f6164941b74aac388873588b325569cb704 100644 (file)
 /**
 sample error callback expecting a FILE* client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting a FILE* client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[INFO] %s", msg);
 }
index efc08d3d8033198142ba0ec195e00b25704bff62..f0404f89b97997d28fe022b864248b184e8e0243 100644 (file)
@@ -183,21 +183,21 @@ fin:
 /**
 sample error callback expecting a FILE* client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting a FILE* client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[INFO] %s", msg);
 }
index 0e27d75a5b2b9adb140411380cc055c3d3ad9438..17a50051e397879ae684d9c0fc277b0e5171e9fc 100644 (file)
@@ -73,7 +73,7 @@ typedef struct opj_procedure_list
  *
  * @return     the newly created validation list.
  */
-opj_procedure_list_t *  opj_procedure_list_create();
+opj_procedure_list_t *  opj_procedure_list_create(void);
 
 /**
  * Destroys a validation list.
index 7758f0c38d9f860959b264fb5b1008e05fb815a3..5a87a78f7d59f7063392a8ddc09cfb57ec921252 100644 (file)
@@ -134,11 +134,11 @@ void opj_calculate_norms(   OPJ_FLOAT64 * pNorms,
 /**
 FIXME DOC 
 */
-const OPJ_FLOAT64 * opj_mct_get_mct_norms ();
+const OPJ_FLOAT64 * opj_mct_get_mct_norms (void);
 /**
 FIXME DOC 
 */
-const OPJ_FLOAT64 * opj_mct_get_mct_norms_real ();
+const OPJ_FLOAT64 * opj_mct_get_mct_norms_real (void);
 /* ----------------------------------------------------------------------- */
 /*@}*/
 
index e50555340acae77c56b134a671fd1d55233694b0..b0f4be39375bece1ba02fe1283a34073ff8a49a7 100644 (file)
@@ -199,13 +199,13 @@ opj_bool OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec,
 
 /* ---------------------------------------------------------------------- */
 
-OPJ_SIZE_T opj_read_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
+static OPJ_SIZE_T opj_read_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
 {
        OPJ_SIZE_T l_nb_read = fread(p_buffer,1,p_nb_bytes,p_file);
        return l_nb_read ? l_nb_read : -1;
 }
 
-OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file)
+static OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file)
 {
        OPJ_OFF_T file_length = 0;
 
@@ -216,12 +216,12 @@ OPJ_UINT64 opj_get_data_length_from_file (FILE * p_file)
        return file_length;
 }
 
-OPJ_SIZE_T opj_write_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
+static OPJ_SIZE_T opj_write_from_file (void * p_buffer, OPJ_SIZE_T p_nb_bytes, FILE * p_file)
 {
        return fwrite(p_buffer,1,p_nb_bytes,p_file);
 }
 
-OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
+static OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
 {
        if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_CUR)) {
                return -1;
@@ -230,7 +230,7 @@ OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
        return p_nb_bytes;
 }
 
-opj_bool opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
+static opj_bool opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
 {
        if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_SET)) {
                return OPJ_FALSE;
index ab6c626dff1886c2afd28816b980537ee21d7639..09fbe0f6c7efa991c3a00f2937648c5458679158 100644 (file)
@@ -143,7 +143,7 @@ opj_bool opj_t1_decode_cblks(   opj_t1_t* t1,
  * and initializes the look-up tables of the Tier-1 coder/decoder
  * @return a new T1 handle if successful, returns NULL otherwise
 */
-opj_t1_t* opj_t1_create();
+opj_t1_t* opj_t1_create(void);
 
 /**
  * Destroys a previously created T1 handle
index 47010d46bb17c246fa07639963f8f6a560b6096e..2c91342f7af3bf11f34479498bdd1bb582cc22e4 100755 (executable)
@@ -63,7 +63,7 @@ typedef struct opj_bio {
 Create a new BIO handle \r
 @return Returns a new BIO handle if successful, returns NULL otherwise\r
 */\r
-opj_bio_t* bio_create();\r
+opj_bio_t* bio_create(void);\r
 /**\r
 Destroy a previously created BIO handle\r
 @param bio BIO handle to destroy\r
index 4ac64fd3f3ba89673d40fc697adad18604dbcab1..4e99c847ddc3bb86509298d0b620cd24349f08d1 100755 (executable)
@@ -122,7 +122,7 @@ unsigned char *cio_getbp(opj_cio_t *cio) {
 /*\r
  * Write a byte.\r
  */\r
-bool cio_byteout(opj_cio_t *cio, unsigned char v) {\r
+static bool cio_byteout(opj_cio_t *cio, unsigned char v) {\r
        if (cio->bp >= cio->end) {\r
                opj_event_msg(cio->cinfo, EVT_ERROR, "write error\n");\r
                return false;\r
@@ -134,7 +134,7 @@ bool cio_byteout(opj_cio_t *cio, unsigned char v) {
 /*\r
  * Read a byte.\r
  */\r
-unsigned char cio_bytein(opj_cio_t *cio) {\r
+static unsigned char cio_bytein(opj_cio_t *cio) {\r
        if (cio->bp >= cio->end) {\r
                opj_event_msg(cio->cinfo, EVT_ERROR, "read error\n");\r
                return 0;\r
index 5ab5d94bf1ff7c37b6bea85150d15169f3c6d1d3..593cda825ca8f77ee2a677606f4dde93c8dc381f 100755 (executable)
@@ -316,7 +316,7 @@ static void j3d_read_nlt(opj_j3d_t *j3d);
 \r
 /* ----------------------------------------------------------------------- */\r
 \r
-void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {\r
+static void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {\r
        int compno;\r
        fprintf(fd, "volume {\n");\r
        fprintf(fd, "  x0=%d, y0=%d, z0=%d, x1=%d, y1=%d, z1=%d\n", vol->x0, vol->y0, vol->z0,vol->x1, vol->y1,  vol->z1);\r
@@ -332,7 +332,7 @@ void j3d_dump_volume(FILE *fd, opj_volume_t * vol) {
        fprintf(fd, "}\n");\r
 }\r
 \r
-void j3d_dump_cp(FILE *fd, opj_volume_t * vol, opj_cp_t * cp) {\r
+static void j3d_dump_cp(FILE *fd, opj_volume_t * vol, opj_cp_t * cp) {\r
        int tileno, compno, layno, bandno, resno, numbands;\r
        fprintf(fd, "coding parameters {\n");\r
        fprintf(fd, "  tx0=%d, ty0=%d, tz0=%d\n", cp->tx0, cp->ty0, cp->tz0);\r
index a2fb05baae551847cd2100924eaff8121c7a0222..dae43275bdf88a102da3cc4ad6e652fd3347af94 100755 (executable)
@@ -43,7 +43,7 @@ The functions in JP3D_LIB.C are internal utilities mainly used for memory manage
 Difference in successive opj_clock() calls tells you the elapsed time\r
 @return Returns time in seconds\r
 */\r
-double opj_clock();\r
+double opj_clock(void);\r
 \r
 /**\r
 Allocate a memory block with elements initialized to 0\r
index 902533562d0b42781a5adbb3d59381869fd559d2..023bf41578f310b15e15aa02bd268fc342afcdae 100755 (executable)
@@ -78,7 +78,7 @@ typedef struct opj_mqc {
 Create a new MQC handle \r
 @return Returns a new MQC handle if successful, returns NULL otherwise\r
 */\r
-opj_mqc_t* mqc_create();\r
+opj_mqc_t* mqc_create(void);\r
 /**\r
 Destroy a previously created MQC handle\r
 @param mqc MQC handle to destroy\r
index d7ac42da888a328be32fd33dfb02589e8ca3591f..44fe1f70a14ee75b92bacf605985d96c27506620 100755 (executable)
@@ -560,7 +560,7 @@ extern "C" {
 ==========================================================\r
 */\r
 \r
-OPJ_API const char * OPJ_CALLCONV opj_version();\r
+OPJ_API const char * OPJ_CALLCONV opj_version(void);\r
 \r
 /* \r
 ==========================================================\r
index c26546adceaca92fa11b660e51ac3ec8ec9e1c91..55e889da3c22f95f2653a00dc08a7e26b1cb06ad 100755 (executable)
@@ -66,7 +66,7 @@ typedef struct opj_raw {
 Create a new RAW handle \r
 @return Returns a new RAW handle if successful, returns NULL otherwise\r
 */\r
-opj_raw_t* raw_create();\r
+opj_raw_t* raw_create(void);\r
 /**\r
 Destroy a previously created RAW handle\r
 @param raw RAW handle to destroy\r
index 88b1bcf61a2f5b2ddbe2a2729ccd5deaee81ed86..84c1ed1e1084f0599f2012385263c341a879e982 100755 (executable)
@@ -82,7 +82,7 @@ void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_volume_t * vol) {
        fprintf(fd, "}\n");\r
 }\r
 \r
-void tilec_dump(FILE *fd, opj_tcd_tilecomp_t *tilec) {\r
+static void tilec_dump(FILE *fd, opj_tcd_tilecomp_t *tilec) {\r
 \r
        int i=0,k;\r
        int datalen;\r
index a2566ea887252c6f707a3a854ab122168eee85e2..89b7565ef1e3c782d3d09f768e943b46dfcc0d58 100644 (file)
@@ -34,7 +34,7 @@
  * Store information (7 bits) in value
  *
  */
-unsigned int jpt_read_VBAS_info(opj_cio_t *cio, unsigned int value) {
+static unsigned int jpt_read_VBAS_info(opj_cio_t *cio, unsigned int value) {
        unsigned char elmt;
 
        elmt = cio_read(cio, 1);
@@ -69,7 +69,7 @@ void jpt_init_msg_header(opj_jpt_msg_header_t * header) {
  * Only parameters always present in message header
  *
  */
-void jpt_reinit_msg_header(opj_jpt_msg_header_t * header) {
+static void jpt_reinit_msg_header(opj_jpt_msg_header_t * header) {
        header->Id = 0;         /* In-class Identifier    */
        header->last_byte = 0;  /* Last byte information  */
        header->Msg_offset = 0; /* Message offset         */
index e01834a67108a53dd4a146515319337e07362f57..9e53f366bc4c6352ee3c9b999141aa5afc9a6884 100644 (file)
@@ -50,6 +50,8 @@ add_test(tte2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 3 2048 2048 1024 1024
 add_test(tte3 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 2048 2048 1024 1024 8 1 tte3.j2k)
 add_test(tte4 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1  256  256  128  128 8 0 tte4.j2k)
 add_test(tte5 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1  512  512  256  256 8 0 tte5.j2k)
+#add_test(tte6 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 8192 8192  512  512 8 0 tte6.j2k)
+#add_test(tte7 ${EXECUTABLE_OUTPUT_PATH}/test_tile_encoder 1 32768 32768 512  512 8 0 tte7.jp2)
 
 add_executable(test_tile_decoder test_tile_decoder.c)
 target_link_libraries(test_tile_decoder ${OPENJPEG_LIBRARY_NAME})
@@ -60,6 +62,10 @@ add_test(ttd1 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte1.j2k
 set_property(TEST ttd1 APPEND PROPERTY DEPENDS tte1)
 add_test(ttd2 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0 1024 1024 tte2.jp2)
 set_property(TEST ttd2 APPEND PROPERTY DEPENDS tte2)
+#add_test(ttd6 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0  512  512 tte6.j2k)
+#set_property(TEST ttd6 APPEND PROPERTY DEPENDS tte6)
+#add_test(ttd7 ${EXECUTABLE_OUTPUT_PATH}/test_tile_decoder 0 0  512  512 tte7.jp2)
+#set_property(TEST ttd7 APPEND PROPERTY DEPENDS tte7)
 
 # No image send to the dashboard if lib PNG is not available.
 if(NOT HAVE_LIBPNG)
index 0421bebf68b4c3a8ba428f7e4e6ae75f9b95e482..53e423b83f352e9e9ef3b6f53113d02231c7de8b 100644 (file)
@@ -62,7 +62,7 @@ void compareRAWimages_help_display(void) {
 /*******************************************************************************
  * Parse command line
  *******************************************************************************/
-int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
+static int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
 {
        int sizemembasefile, sizememtestfile;
        int index;
index e503d12090fcf7e153b8a50cfd8a60ecf1dcef5f..fa4774951b4e2fc5652e19ad24cb7fa425af4f41 100644 (file)
@@ -50,7 +50,7 @@ typedef struct test_cmp_parameters
 /*******************************************************************************
  * Command line help function
  *******************************************************************************/
-void compare_dump_files_help_display(void) {
+static void compare_dump_files_help_display(void) {
   fprintf(stdout,"\nList of parameters for the compare_dump_files function  \n");
   fprintf(stdout,"\n");
   fprintf(stdout,"  -b \t REQUIRED \t filename to the reference/baseline dump file \n");
@@ -60,7 +60,7 @@ void compare_dump_files_help_display(void) {
 /*******************************************************************************
  * Parse command line
  *******************************************************************************/
-int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
+static int parse_cmdline_cmp(int argc, char **argv, test_cmp_parameters* param)
 {
   int sizemembasefile, sizememtestfile;
   int index;
index d8b70f1506f635d0a0120b02456e0d0341b1a333..6fb7e26afcbbabed7d1fd232bbc85201bf0129e6 100644 (file)
@@ -48,7 +48,7 @@
 #include "format_defs.h"
 
 /* -------------------------------------------------------------------------- */
-int get_file_format(const char *filename) {
+static int get_file_format(const char *filename) {
        unsigned int i;
        static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp","tif", "raw", "tga", "png", "j2k", "jp2", "jpt", "j2c", "jpc" };
        static const int format[] = { PGX_DFMT, PXM_DFMT, PXM_DFMT, PXM_DFMT, BMP_DFMT, TIF_DFMT, RAW_DFMT, TGA_DFMT, PNG_DFMT, J2K_CFMT, JP2_CFMT, JPT_CFMT, J2K_CFMT, J2K_CFMT };
@@ -72,21 +72,21 @@ int get_file_format(const char *filename) {
 /**
 sample error callback expecting a FILE* client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting no client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[INFO] %s", msg);
 }
index 8ff7ad28e960a1b7ba9c28ee2a29962b41a2fd20..6691cd4e8b293428c2c806d057d0e7478133e5e0 100644 (file)
@@ -139,35 +139,35 @@ static int infile_format(const char *fname)
 /**
   sample error callback expecting a FILE* client object
  */
-void error_callback_file(const char *msg, void *client_data) {
+static void error_callback_file(const char *msg, void *client_data) {
         FILE *stream = (FILE*)client_data;
         fprintf(stream, "[ERROR] %s", msg);
 }
 /**
   sample warning callback expecting a FILE* client object
  */
-void warning_callback_file(const char *msg, void *client_data) {
+static void warning_callback_file(const char *msg, void *client_data) {
         FILE *stream = (FILE*)client_data;
         fprintf(stream, "[WARNING] %s", msg);
 }
 /**
   sample error debug callback expecting no client object
  */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
         (void)client_data;
         fprintf(stdout, "[ERROR] %s", msg);
 }
 /**
   sample warning debug callback expecting no client object
  */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
         (void)client_data;
         fprintf(stdout, "[WARNING] %s", msg);
 }
 /**
   sample debug callback expecting no client object
  */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
         (void)client_data;
         fprintf(stdout, "[INFO] %s", msg);
 }
index 160391b049557d880851d67b7bafdfa93a366d3d..a405d86e9dd81c22db3e081b87cda45943366f0e 100644 (file)
 /**
 sample error callback expecting a FILE* client object
 */
-void error_callback_file(const char *msg, void *client_data) {
+static void error_callback_file(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[ERROR] %s", msg);
 }
 /**
 sample warning callback expecting a FILE* client object
 */
-void warning_callback_file(const char *msg, void *client_data) {
+static void warning_callback_file(const char *msg, void *client_data) {
        FILE *stream = (FILE*)client_data;
        fprintf(stream, "[WARNING] %s", msg);
 }
 /**
 sample error debug callback expecting no client object
 */
-void error_callback(const char *msg, void *client_data) {
+static void error_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[ERROR] %s", msg);
 }
 /**
 sample warning debug callback expecting no client object
 */
-void warning_callback(const char *msg, void *client_data) {
+static void warning_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[WARNING] %s", msg);
 }
 /**
 sample debug callback expecting no client object
 */
-void info_callback(const char *msg, void *client_data) {
+static void info_callback(const char *msg, void *client_data) {
        (void)client_data;
        fprintf(stdout, "[INFO] %s", msg);
 }