solve some obvious warnings for WIN platform, increase number of warning reported on the dashboard, correct last warnings with gcc 4.4 (-Wall)

This commit is contained in:
Mickael Savinaud
2011-07-29 08:50:55 +00:00
parent e716a316f6
commit 5743cca5f8
12 changed files with 62 additions and 51 deletions

View File

@@ -73,7 +73,7 @@ typedef struct img_folder{
}img_fol_t;
void decode_help_display() {
void decode_help_display(void) {
fprintf(stdout,"HELP for j2k_dump\n----\n\n");
fprintf(stdout,"- the -h option displays this help information on screen\n\n");
@@ -196,7 +196,7 @@ char get_next_file(int imageno,dircnt_t *dirptr,img_fol_t *img_fol, opj_dparamet
/* -------------------------------------------------------------------------- */
int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,img_fol_t *img_fol, char *indexfilename) {
/* parse the command line */
int totlen;
int totlen, c;
option_t long_option[]={
{"ImgDir",REQ_ARG, NULL ,'y'},
};
@@ -204,8 +204,8 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
const char optlist[] = "i:o:h";
totlen=sizeof(long_option);
img_fol->set_out_format = 0;
while (1) {
int c = getopt_long(argc, argv,optlist,long_option,totlen);
do {
c = getopt_long(argc, argv,optlist,long_option,totlen);
if (c == -1)
break;
switch (c) {
@@ -259,7 +259,7 @@ int parse_cmdline_decoder(int argc, char **argv, opj_dparameters_t *parameters,i
fprintf(stderr,"WARNING -> this option is not valid \"-%c %s\"\n",c, optarg);
break;
}
}
}while(c != -1);
/* check for possible errors */
if(img_fol->set_imgdir==1){
@@ -412,7 +412,7 @@ int main(int argc, char *argv[])
file_length = ftell(fsrc);
fseek(fsrc, 0, SEEK_SET);
src = (unsigned char *) malloc(file_length);
if (fread(src, 1, file_length, fsrc) != file_length)
if (fread(src, 1, file_length, fsrc) != (size_t)file_length)
{
free(src);
fclose(fsrc);
@@ -463,7 +463,7 @@ int main(int argc, char *argv[])
/* Write the index to disk */
if (*indexfilename) {
char bSuccess;
opj_bool bSuccess;
bSuccess = write_index_file(&cstr_info, indexfilename);
if (bSuccess) {
fprintf(stderr, "Failed to output index file\n");
@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
/* Write the index to disk */
if (*indexfilename) {
char bSuccess;
opj_bool bSuccess;
bSuccess = write_index_file(&cstr_info, indexfilename);
if (bSuccess) {
fprintf(stderr, "Failed to output index file\n");
@@ -556,7 +556,7 @@ int main(int argc, char *argv[])
/* Write the index to disk */
if (*indexfilename) {
char bSuccess;
opj_bool bSuccess;
bSuccess = write_index_file(&cstr_info, indexfilename);
if (bSuccess) {
fprintf(stderr, "Failed to output index file\n");