[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

@ -39,21 +39,21 @@ foreach(exe decompress compress)
TARGET ${jpwl_exe}
APPEND PROPERTY COMPILE_DEFINITIONS USE_JPWL
)
target_link_libraries(${jpwl_exe} openjpwl
${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
${LCMS_LIBNAME} ${PNG_LIBNAME} ${TIFF_LIBNAME})
# To support universal exe:
if(ZLIB_FOUND AND APPLE)
target_link_libraries(${jpwl_exe} z)
else(ZLIB_FOUND AND APPLE)
target_link_libraries(${jpwl_exe} ${Z_LIBNAME})
endif()
if(UNIX)
target_link_libraries(${jpwl_exe} m)
endif()
install(TARGETS ${jpwl_exe}
DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
)

View File

@ -43,10 +43,10 @@
#ifdef _WIN32
#include <windows.h>
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#else
#include <strings.h>
#define _stricmp strcasecmp
#define _strnicmp strncasecmp
#endif /* _WIN32 */
#include "opj_config.h"
@ -82,8 +82,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_jpwl_compress\n----\n\n");
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
/* UniPG>> */
@ -321,7 +321,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;
}
@ -341,10 +341,10 @@ OPJ_PROG_ORDER give_progression(char progression[4]) {
return PROG_UNKNOWN;
}
int get_num_images(char *imgdirpath){
static unsigned int get_num_images(char *imgdirpath){
DIR *dir;
struct dirent* content;
int num_images = 0;
unsigned int num_images = 0;
/*Reading the input images from given input directory*/
@ -363,7 +363,7 @@ 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;
@ -388,7 +388,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", "tga", "png", "j2k", "jp2", "j2c", "jpc"
@ -401,21 +401,21 @@ int get_file_format(char *filename) {
return -1;
ext++;
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 -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]="";
@ -458,7 +458,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;
@ -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;
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) {
int i, j, totlen, c;
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
*/
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);
}