[trunk] Remove some simple warnings in opj_dump
This commit is contained in:
parent
7a89d731f7
commit
1eb67ca49d
|
@ -75,14 +75,13 @@ typedef struct img_folder{
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* Declarations */
|
/* Declarations */
|
||||||
int get_num_images(char *imgdirpath);
|
static int get_num_images(char *imgdirpath);
|
||||||
int load_images(dircnt_t *dirptr, char *imgdirpath);
|
static int load_images(dircnt_t *dirptr, char *imgdirpath);
|
||||||
int get_file_format(const char *filename);
|
static int get_file_format(const char *filename);
|
||||||
char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_dparameters_t *parameters);
|
static char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_dparameters_t *parameters);
|
||||||
static int infile_format(const char *fname);
|
static int infile_format(const char *fname);
|
||||||
|
|
||||||
int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,img_fol_t *img_fol);
|
static int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,img_fol_t *img_fol);
|
||||||
int parse_DA_values( char* inArg, unsigned int *DA_x0, unsigned int *DA_y0, unsigned int *DA_x1, unsigned int *DA_y1);
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
static void decode_help_display(void) {
|
static void decode_help_display(void) {
|
||||||
|
@ -116,7 +115,7 @@ static void decode_help_display(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int get_num_images(char *imgdirpath){
|
static int get_num_images(char *imgdirpath){
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent* content;
|
struct dirent* content;
|
||||||
int num_images = 0;
|
int num_images = 0;
|
||||||
|
@ -138,7 +137,7 @@ int get_num_images(char *imgdirpath){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int load_images(dircnt_t *dirptr, char *imgdirpath){
|
static int load_images(dircnt_t *dirptr, char *imgdirpath){
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct dirent* content;
|
struct dirent* content;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -164,7 +163,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int get_file_format(const char *filename) {
|
static int get_file_format(const char *filename) {
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
static const char *extension[] = {"pgx", "pnm", "pgm", "ppm", "bmp","tif", "raw", "tga", "png", "j2k", "jp2", "jpt", "j2c", "jpc" };
|
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 };
|
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 };
|
||||||
|
@ -184,7 +183,7 @@ int get_file_format(const char *filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_dparameters_t *parameters){
|
static char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_dparameters_t *parameters){
|
||||||
char image_filename[OPJ_PATH_LEN], infilename[OPJ_PATH_LEN],outfilename[OPJ_PATH_LEN],temp_ofname[OPJ_PATH_LEN];
|
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]="";
|
char *temp_p, temp1[OPJ_PATH_LEN]="";
|
||||||
|
|
||||||
|
@ -221,7 +220,7 @@ static int infile_format(const char *fname)
|
||||||
const char *s, *magic_s;
|
const char *s, *magic_s;
|
||||||
int ext_format, magic_format;
|
int ext_format, magic_format;
|
||||||
unsigned char buf[12];
|
unsigned char buf[12];
|
||||||
unsigned int l_nb_read;
|
size_t l_nb_read;
|
||||||
|
|
||||||
reader = fopen(fname, "rb");
|
reader = fopen(fname, "rb");
|
||||||
|
|
||||||
|
@ -269,7 +268,7 @@ static int infile_format(const char *fname)
|
||||||
* Parse the command line
|
* Parse the command line
|
||||||
*/
|
*/
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,img_fol_t *img_fol) {
|
static int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,img_fol_t *img_fol) {
|
||||||
int totlen, c;
|
int totlen, c;
|
||||||
opj_option_t long_option[]={
|
opj_option_t long_option[]={
|
||||||
{"ImgDir",REQ_ARG, NULL ,'y'},
|
{"ImgDir",REQ_ARG, NULL ,'y'},
|
||||||
|
|
Loading…
Reference in New Issue