summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5
diff options
context:
space:
mode:
Diffstat (limited to 'hl/tools/gif2h5')
-rw-r--r--hl/tools/gif2h5/gif.h2
-rw-r--r--hl/tools/gif2h5/gif2hdf.c8
-rw-r--r--hl/tools/gif2h5/gifread.c2
-rw-r--r--hl/tools/gif2h5/hdf2gif.c10
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c2
-rw-r--r--hl/tools/gif2h5/writehdf.c12
6 files changed, 13 insertions, 23 deletions
diff --git a/hl/tools/gif2h5/gif.h b/hl/tools/gif2h5/gif.h
index ad60968..535126d 100644
--- a/hl/tools/gif2h5/gif.h
+++ b/hl/tools/gif2h5/gif.h
@@ -161,7 +161,7 @@ int hdfWriteGIF(FILE *fp, BYTE *pic, int ptype, int w, int h, BYTE *rmap,
int colorstyle, int BitsPerPixel);
/* WRITEHDF.C */
-int WriteHDF(GIFTOMEM , CHAR * , CHAR *);
+int WriteHDF(GIFTOMEM , CHAR *);
/* Function: ReadHDF
** Return: 0 on completion without error, -1 on error
diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c
index 2863b4b..8627548 100644
--- a/hl/tools/gif2h5/gif2hdf.c
+++ b/hl/tools/gif2h5/gif2hdf.c
@@ -52,8 +52,8 @@ main(int argv , char *argc[])
return(-1);
}
- strncpy(GIFFileName , argc[1] , VSNAMELENMAX - 1);
- strncpy(HDFFileName , argc[2] , VSNAMELENMAX - 1);
+ strncpy(GIFFileName , argc[1] , (size_t)(VSNAMELENMAX - 1));
+ strncpy(HDFFileName , argc[2] , (size_t)(VSNAMELENMAX - 1));
GIFFileName[VSNAMELENMAX - 1] = '\0';
HDFFileName[VSNAMELENMAX - 1] = '\0';
@@ -77,7 +77,7 @@ main(int argv , char *argc[])
exit (-1);
}
- if (fread(MemGif,(size_t)filesize,1,fpGif) != 1) {
+ if (fread(MemGif,(size_t)filesize,(size_t)1,fpGif) != 1) {
printf("Corrupted Input File");
exit(-1);
}
@@ -101,7 +101,7 @@ main(int argv , char *argc[])
* Call WriteHDF from here. Go ahead and change WriteHDF to write whatever
* format you want
*/
- if (WriteHDF(GifMemoryStruct , argc[2] , argc[1]))
+ if (WriteHDF(GifMemoryStruct , argc[2]))
printf("HDF Write Error\n\n");
/* Free all buffers */
diff --git a/hl/tools/gif2h5/gifread.c b/hl/tools/gif2h5/gifread.c
index 5f4aba0..d0ac695 100644
--- a/hl/tools/gif2h5/gifread.c
+++ b/hl/tools/gif2h5/gifread.c
@@ -65,7 +65,7 @@ ReadGifHeader(GIFHEAD *GifHead, /* Pointer to GIF header structure */
GifHead->HeaderDump[i] = *(*MemGif2)++;
}
- if (strncmp((const char *)GifHead->HeaderDump , "GIF" , 3)) {
+ if (strncmp((const char *)GifHead->HeaderDump , "GIF" , (size_t)3)) {
printf("The file does not appear to be a valid GIF file.\n");
exit(-1);
}
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
index 52e57f7..b3489b6 100644
--- a/hl/tools/gif2h5/hdf2gif.c
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -113,8 +113,8 @@ int main(int argc , char **argv)
return 0;
}
- memset(image_name_arr , 0 , MAX_NUMBER_IMAGES);
- memset(pal_name_arr , 0 , MAX_NUMBER_IMAGES);
+ memset(image_name_arr , 0 , (size_t)MAX_NUMBER_IMAGES);
+ memset(pal_name_arr , 0 , (size_t)MAX_NUMBER_IMAGES);
HDFName = (CHAR *)malloc (strlen(argv[1]) + 1);
GIFName = (CHAR *)malloc (strlen(argv[2]) + 1);
@@ -310,9 +310,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", sizeof( char ), 6, fpGif); /* the GIF magic number */
+ fwrite("GIF89a", sizeof( char ), (size_t)6, fpGif); /* the GIF magic number */
} else {
- fwrite("GIF87a", sizeof( char ), 6, fpGif); /* the GIF magic number */
+ fwrite("GIF87a", sizeof( char ), (size_t)6, fpGif); /* the GIF magic number */
}
putword(RWidth, fpGif); /* screen descriptor */
@@ -334,7 +334,7 @@ int main(int argc , char **argv)
fputc(0x21 , fpGif);
fputc(0xFF , fpGif);
fputc(11 , fpGif);
- fwrite("NETSCAPE2.0" , 1 , 11 , fpGif);
+ fwrite("NETSCAPE2.0" , (size_t)1 , (size_t)11 , fpGif);
fputc(3 , fpGif);
fputc(1 , fpGif);
fputc(0 , fpGif);
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
index b1b5be5..d4ed991 100644
--- a/hl/tools/gif2h5/hdfgifwr.c
+++ b/hl/tools/gif2h5/hdfgifwr.c
@@ -515,7 +515,7 @@ flush_char(void)
{
if (a_count > 0) {
fputc( a_count, g_outfile );
- fwrite( accum, 1, (size_t)a_count, g_outfile);
+ fwrite( accum, (size_t)1, (size_t)a_count, g_outfile);
a_count = 0;
}
}
diff --git a/hl/tools/gif2h5/writehdf.c b/hl/tools/gif2h5/writehdf.c
index bbd74eb..8d02d7d 100644
--- a/hl/tools/gif2h5/writehdf.c
+++ b/hl/tools/gif2h5/writehdf.c
@@ -34,17 +34,12 @@
*/
int
-WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName , char *GIFFileName)
+WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName)
{
GIFHEAD gifHead; /* GIF Header structure */
GIFIMAGEDESC *gifImageDesc; /* Logical Image Descriptor struct */
long ImageCount; /* number of images */
-#ifdef UNUSED
- long CommentCount, /* number of comments */
- ApplicationCount, /* number of application extensions */
- PlainTextCount; /* number of plain text extensions */
-#endif /* UNUSED */
char ImageName[256]; /* Image name for the Image */
@@ -59,11 +54,6 @@ WriteHDF(GIFTOMEM GifMemoryStruct, char *HDFName , char *GIFFileName)
/* get some data from gifHead */
ImageCount = gifHead.ImageCount;
-#ifdef UNUSED
- CommentCount = (WORD)gifHead.CommentCount;
- ApplicationCount = (WORD)gifHead.ApplicationCount;
- PlainTextCount = (WORD)gifHead.PlainTextCount;
-#endif /* UNUSED */
if ((file_id = H5Fcreate(HDFName , H5F_ACC_TRUNC , H5P_DEFAULT , H5P_DEFAULT)) < 0) {
/* error occured opening the HDF File for write */