summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/decompress.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-06-18 20:22:10 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-06-18 20:22:10 (GMT)
commitd41b9fffdfca2e97c36bc0ad0899fbb7b055f926 (patch)
tree51ed39b08a41a4f6947af07630eb40dfdb013d87 /hl/tools/gif2h5/decompress.c
parentfcaf572430a8eda3f6519bd21311ef7a8e3c3c1f (diff)
downloadhdf5-d41b9fffdfca2e97c36bc0ad0899fbb7b055f926.zip
hdf5-d41b9fffdfca2e97c36bc0ad0899fbb7b055f926.tar.gz
hdf5-d41b9fffdfca2e97c36bc0ad0899fbb7b055f926.tar.bz2
[svn-r4012] Purpose:
Clean up compiler warnings. Description: Just code neatening mostly, some casts, etc. Platforms tested: FreeBSD 4.3 (hawkwind)
Diffstat (limited to 'hl/tools/gif2h5/decompress.c')
-rw-r--r--hl/tools/gif2h5/decompress.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/hl/tools/gif2h5/decompress.c b/hl/tools/gif2h5/decompress.c
index 18dbb3e..abccb7f 100644
--- a/hl/tools/gif2h5/decompress.c
+++ b/hl/tools/gif2h5/decompress.c
@@ -19,13 +19,8 @@ static int BitOffset = 0, /* Bit Offset of next code */
XC = 0, YC = 0, /* Output X and Y coords of current pixel */
Pass = 0, /* Used by output routine if WORDerlaced pic */
OutCount = 0, /* Decompressor output 'stack count' */
-RWidth, RHeight, /* screen dimensions */
IWidth, IHeight, /* image dimensions */
-LeftOfs, TopOfs, /* image offset */
-BitsPerPixel, /* Bits per pixel, read from GIF header */
BytesPerScanline, /* Bytes per scanline in output raster */
-ColorMapSize, /* number of colors */
-Background, /* background color */
CodeSize, /* Code size, read from GIF header */
InitCodeSize, /* Starting code size, used during Clear */
Code, /* Value returned by ReadCode */
@@ -73,7 +68,7 @@ int numused;
* three BYTEs, compute the bit Offset WORDo our 24-bit chunk, shift to
* bring the desired code to the bottom, then mask it off and return it.
*/
-ReadCode()
+static int ReadCode(void)
{
int RawCode, ByteOffset;
@@ -87,8 +82,7 @@ ReadCode()
}
-AddToPixel(Index)
-BYTE Index;
+static void AddToPixel(BYTE Index)
{
if (YC<IHeight)
*(Image + YC * BytesPerScanline + XC) = Index;
@@ -202,7 +196,7 @@ GIFHEAD *GifHead;
/* Allocate the Image */
- if (!(Image = (BYTE *)malloc(IWidth*IHeight))) {
+ if (!(Image = (BYTE *)malloc((size_t)IWidth*(size_t)IHeight))) {
printf("Out of memory");
exit(-1);
}