summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-03-25 15:25:59 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-03-25 15:25:59 (GMT)
commit299deb64fb087c2b74649645769f8a873627fa31 (patch)
treee4e57ff508b5889b74e99455738c08e11d88bb91 /hl/tools
parent460b629e0384bd8780e0a47407d4b33a8e02b1f4 (diff)
downloadhdf5-299deb64fb087c2b74649645769f8a873627fa31.zip
hdf5-299deb64fb087c2b74649645769f8a873627fa31.tar.gz
hdf5-299deb64fb087c2b74649645769f8a873627fa31.tar.bz2
[svn-r26575] Removed compiler warning for hl/tools and hl/src.
HDF5-250 and HDF5-241 tested: h5committest
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/gif2h5/decompress.c2
-rw-r--r--hl/tools/gif2h5/gif2mem.c10
-rw-r--r--hl/tools/gif2h5/h52gifgentst.c8
-rw-r--r--hl/tools/gif2h5/hdf2gif.c8
-rw-r--r--hl/tools/gif2h5/hdfgifwr.c8
5 files changed, 18 insertions, 18 deletions
diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c
index d4e4cdc..ef2d78a 100644
--- a/hl/tools/gif2h5/decompress.c
+++ b/hl/tools/gif2h5/decompress.c
@@ -90,7 +90,7 @@ ReadCode(void)
RawCode += (0x10000 * Raster[ByteOffset + 2]);
RawCode >>= (BitOffset % 8);
- BitOffset += CodeSize;
+ BitOffset += (int)CodeSize;
return (RawCode & ReadMask);
}
diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c
index a2e4893..456a32d 100644
--- a/hl/tools/gif2h5/gif2mem.c
+++ b/hl/tools/gif2h5/gif2mem.c
@@ -153,7 +153,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
if (ImageCount > ImageArray) {
aTemp = ImageArray;
- ImageArray = (ImageArray << 1) + 1;
+ ImageArray = (BYTE)((ImageArray << 1) + 1);
if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(gifImageDesc,
sizeof(GIFIMAGEDESC *) * ImageArray))) {
printf("Out of memory!");
@@ -220,7 +220,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
PlainTextCount++;
if (PlainTextCount > PlainTextArray)
- PlainTextArray = (PlainTextArray << 1) + 1;
+ PlainTextArray = (BYTE)((PlainTextArray << 1) + 1);
if (!(gifPlainText = (GIFPLAINTEXT **)realloc(gifPlainText , sizeof(GIFPLAINTEXT *) * PlainTextArray))) {
printf("Out of memory!");
@@ -242,7 +242,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
CommentCount++;
if (CommentCount > CommentArray)
- CommentArray = (CommentArray << 1) + 1;
+ CommentArray = (BYTE)((CommentArray << 1) + 1);
if (!(gifComment = (GIFCOMMENT **)realloc(gifComment , sizeof(GIFCOMMENT *) * CommentArray))) {
printf("Out of memory!");
@@ -269,7 +269,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
if (ImageCount > ImageArray) {
aTemp = ImageArray;
- ImageArray = (ImageArray << 1) + 1;
+ ImageArray = (BYTE)((ImageArray << 1) + 1);
if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(gifGraphicControl , sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
printf("Out of memory!");
@@ -307,7 +307,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
ApplicationCount++;
if (ApplicationCount > ApplicationArray)
- ApplicationArray = (ApplicationArray << 1) + 1;
+ ApplicationArray = (BYTE)((ApplicationArray << 1) + 1);
if (!(gifApplication = (GIFAPPLICATION **)realloc(gifApplication , sizeof(GIFAPPLICATION *) * ApplicationArray))) {
printf("Out of memory!");
diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c
index ef38c3b..3433d0a 100644
--- a/hl/tools/gif2h5/h52gifgentst.c
+++ b/hl/tools/gif2h5/h52gifgentst.c
@@ -64,7 +64,7 @@ int main(void)
space = WIDTH*HEIGHT / PAL_ENTRIES;
for (i=0, j=0, n=0; i < WIDTH*HEIGHT; i++, j++ )
{
- buf[i] = n;
+ buf[i] = (unsigned char)n;
if ( j > space )
{
n++;
@@ -83,9 +83,9 @@ int main(void)
*/
for ( i=0, n=0; i<PAL_ENTRIES*3; i+=3, n++)
{
- pal[i] =n; /* red */
- pal[i+1]=0; /* green */
- pal[i+2]=255-n; /* blue */
+ pal[i] = (unsigned char)n; /* red */
+ pal[i+1] = (unsigned char)0; /* green */
+ pal[i+2] = (unsigned char)(255-n); /* blue */
}
/* make a palette */
diff --git a/hl/tools/gif2h5/hdf2gif.c b/hl/tools/gif2h5/hdf2gif.c
index 090d657..fe79975 100644
--- a/hl/tools/gif2h5/hdf2gif.c
+++ b/hl/tools/gif2h5/hdf2gif.c
@@ -194,9 +194,9 @@ int main(int argc , char **argv)
numcols = 256;
for (i = 0 ; i < numcols ; i++)
{
- Red[i] = 255 - i;
- Green[i] = 255 - i;
- Blue[i] = 255 - i;
+ Red[i] = (BYTE)(255 - i);
+ Green[i] = (BYTE)(255 - i);
+ Blue[i] = (BYTE)(255 - i);
}
}
else
@@ -229,7 +229,7 @@ int main(int argc , char **argv)
if (j==i)
{
/* wasn't found */
- pc2nc[i] = nc;
+ pc2nc[i] = (BYTE)nc;
r1[nc] = Red[i];
g1[nc] = Green[i];
b1[nc] = Blue[i];
diff --git a/hl/tools/gif2h5/hdfgifwr.c b/hl/tools/gif2h5/hdfgifwr.c
index d828226..4c52f4c 100644
--- a/hl/tools/gif2h5/hdfgifwr.c
+++ b/hl/tools/gif2h5/hdfgifwr.c
@@ -270,7 +270,7 @@ nomatch:
ent = c;
if (free_ent < maxmaxcode) {
- CodeTabOf (i) = free_ent++; /* code -> hashtable */
+ CodeTabOf (i) = (unsigned short)free_ent++; /* code -> hashtable */
HashTabOf (i) = fcode;
} else {
cl_block();
@@ -313,9 +313,9 @@ output(int code)
cur_accum &= masks[cur_bits];
if (cur_bits > 0)
- cur_accum |= ((long)code << cur_bits);
+ cur_accum |= (unsigned long)((long)code << cur_bits);
else
- cur_accum = code;
+ cur_accum = (unsigned long)code;
cur_bits += n_bits;
@@ -437,7 +437,7 @@ static char accum[ 256 ];
static void
char_out(int c)
{
- accum[ a_count++ ] = c;
+ accum[ a_count++ ] = (char)c;
if (a_count >= 254)
flush_char();