diff options
-rw-r--r-- | hl/tools/gif2h5/hdf2gif.c | 8 | ||||
-rw-r--r-- | hl/tools/gif2h5/readhdf.c | 2 | ||||
-rw-r--r-- | tools/gifconv/hdf2gif.c | 8 | ||||
-rw-r--r-- | tools/gifconv/readhdf.c | 2 |
4 files changed, 12 insertions, 8 deletions
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c index 40051dc..941c510 100644 --- a/hl/tools/gif2h5/hdf2gif.c +++ b/hl/tools/gif2h5/hdf2gif.c @@ -52,9 +52,11 @@ usage(void) printf("(maximum of 50 images).\n"); } +FILE *fpGif = NULL; int main(int argc , char **argv) { - FILE *fpGif; + + hsize_t dim_sizes[2]; BYTE *Image; @@ -299,9 +301,9 @@ int main(int argc , char **argv) if (idx == 0) { /* Write out the GIF header and logical screen descriptor */ if (n_images > 1) { - fwrite("GIF89a", 1, 6, fpGif); /* the GIF magic number */ + fwrite("GIF89a", sizeof( char ), 6, fpGif); /* the GIF magic number */ } else { - fwrite("GIF87a", 1, 6, fpGif); /* the GIF magic number */ + fwrite("GIF87a", sizeof( char ), 6, fpGif); /* the GIF magic number */ } putword(RWidth, fpGif); /* screen descriptor */ diff --git a/hl/tools/gif2h5/readhdf.c b/hl/tools/gif2h5/readhdf.c index 08258de..f1a3a39 100644 --- a/hl/tools/gif2h5/readhdf.c +++ b/hl/tools/gif2h5/readhdf.c @@ -72,7 +72,7 @@ int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size, } /* get the dimension size of the image */ - if (H5Sget_simple_extent_dims(dspace , image_size , NULL) !=2 ) { + if (H5Sget_simple_extent_dims(dspace , image_size , NULL) <0 ) { fprintf(stderr , "Unable to get dimension info\n"); return -1; } diff --git a/tools/gifconv/hdf2gif.c b/tools/gifconv/hdf2gif.c index 40051dc..941c510 100644 --- a/tools/gifconv/hdf2gif.c +++ b/tools/gifconv/hdf2gif.c @@ -52,9 +52,11 @@ usage(void) printf("(maximum of 50 images).\n"); } +FILE *fpGif = NULL; int main(int argc , char **argv) { - FILE *fpGif; + + hsize_t dim_sizes[2]; BYTE *Image; @@ -299,9 +301,9 @@ int main(int argc , char **argv) if (idx == 0) { /* Write out the GIF header and logical screen descriptor */ if (n_images > 1) { - fwrite("GIF89a", 1, 6, fpGif); /* the GIF magic number */ + fwrite("GIF89a", sizeof( char ), 6, fpGif); /* the GIF magic number */ } else { - fwrite("GIF87a", 1, 6, fpGif); /* the GIF magic number */ + fwrite("GIF87a", sizeof( char ), 6, fpGif); /* the GIF magic number */ } putword(RWidth, fpGif); /* screen descriptor */ diff --git a/tools/gifconv/readhdf.c b/tools/gifconv/readhdf.c index 08258de..f1a3a39 100644 --- a/tools/gifconv/readhdf.c +++ b/tools/gifconv/readhdf.c @@ -72,7 +72,7 @@ int ReadHDF(BYTE** data, BYTE palette[256][3], hsize_t *image_size, } /* get the dimension size of the image */ - if (H5Sget_simple_extent_dims(dspace , image_size , NULL) !=2 ) { + if (H5Sget_simple_extent_dims(dspace , image_size , NULL) <0 ) { fprintf(stderr , "Unable to get dimension info\n"); return -1; } |