[trunk] Remove some simple warnings about missing prototypes

This commit is contained in:
Mathieu Malaterre 2012-10-25 08:20:12 +00:00
parent 4585b23552
commit 66c1228c95
2 changed files with 23 additions and 23 deletions

View File

@ -41,7 +41,7 @@ foreach(exe decompress compress)
) )
target_link_libraries(${jpwl_exe} openjpwl target_link_libraries(${jpwl_exe} openjpwl
${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME}) ${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
# To support universal exe: # To support universal exe:
if(ZLIB_FOUND AND APPLE) if(ZLIB_FOUND AND APPLE)

View File

@ -43,10 +43,10 @@
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#else #else
#include <strings.h> #include <strings.h>
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
#endif /* _WIN32 */ #endif /* _WIN32 */
#include "opj_config.h" #include "opj_config.h"
@ -82,8 +82,8 @@ typedef struct img_folder{
float *rates; float *rates;
}img_fol_t; }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,"HELP for opj_jpwl_compress\n----\n\n");
fprintf(stdout,"- the -h option displays this help information on screen\n\n"); fprintf(stdout,"- the -h option displays this help information on screen\n\n");
/* UniPG>> */ /* UniPG>> */
@ -321,7 +321,7 @@ void encode_help_display(void) {
fprintf(stdout,"TotalDisto\n\n"); 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) { if(strncmp(progression, "LRCP", 4) == 0) {
return LRCP; return LRCP;
} }
@ -341,10 +341,10 @@ OPJ_PROG_ORDER give_progression(char progression[4]) {
return PROG_UNKNOWN; return PROG_UNKNOWN;
} }
int get_num_images(char *imgdirpath){ static unsigned int get_num_images(char *imgdirpath){
DIR *dir; DIR *dir;
struct dirent* content; struct dirent* content;
int num_images = 0; unsigned int num_images = 0;
/*Reading the input images from given input directory*/ /*Reading the input images from given input directory*/
@ -363,7 +363,7 @@ int get_num_images(char *imgdirpath){
return num_images; return num_images;
} }
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;
@ -388,7 +388,7 @@ int load_images(dircnt_t *dirptr, char *imgdirpath){
return 0; return 0;
} }
int get_file_format(char *filename) { static int get_file_format(char *filename) {
unsigned int i; unsigned int i;
static const char *extension[] = { static const char *extension[] = {
"pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "tga", "png", "j2k", "jp2", "j2c", "jpc" "pgx", "pnm", "pgm", "ppm", "pbm", "pam", "bmp", "tif", "raw", "tga", "png", "j2k", "jp2", "j2c", "jpc"
@ -401,21 +401,21 @@ int get_file_format(char *filename) {
return -1; return -1;
ext++; ext++;
for(i = 0; i < sizeof(format)/sizeof(*format); i++) { for(i = 0; i < sizeof(format)/sizeof(*format); i++) {
if(_strnicmp(ext, extension[i], 3) == 0) { if(strcasecmp(ext, extension[i]) == 0) {
return format[i]; return format[i];
} }
} }
return -1; return -1;
} }
char * get_file_name(char *name){ static char * get_file_name(char *name){
char *fname; char *fname;
fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char)); fname= (char*)malloc(OPJ_PATH_LEN*sizeof(char));
fname= strtok(name,"."); fname= strtok(name,".");
return fname; 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 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]="";
@ -458,7 +458,7 @@ static int initialise_4K_poc(opj_poc_t *POC, int numres){
return 2; return 2;
} }
void cinema_parameters(opj_cparameters_t *parameters){ static void cinema_parameters(opj_cparameters_t *parameters){
parameters->tile_size_on = OPJ_FALSE; parameters->tile_size_on = OPJ_FALSE;
parameters->cp_tdx=1; parameters->cp_tdx=1;
parameters->cp_tdy=1; parameters->cp_tdy=1;
@ -491,7 +491,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; int i;
float temp_rate; float temp_rate;
@ -576,7 +576,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) { img_fol_t *img_fol, raw_cparameters_t *raw_cp, char *indexfilename) {
int i, j, totlen, c; int i, j, totlen, c;
opj_option_t long_option[]={ opj_option_t long_option[]={
@ -1466,21 +1466,21 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
/** /**
sample error callback expecting a FILE* client object 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; FILE *stream = (FILE*)client_data;
fprintf(stream, "[ERROR] %s", msg); fprintf(stream, "[ERROR] %s", msg);
} }
/** /**
sample warning callback expecting a FILE* client object 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; FILE *stream = (FILE*)client_data;
fprintf(stream, "[WARNING] %s", msg); fprintf(stream, "[WARNING] %s", msg);
} }
/** /**
sample debug callback expecting a FILE* client object 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; FILE *stream = (FILE*)client_data;
fprintf(stream, "[INFO] %s", msg); fprintf(stream, "[INFO] %s", msg);
} }