Silence lots of warnings in lib/DtHelp.

* 64bit warnings
* Missing prototypes
* explicit parentheses / brackets

There's still some work to be done, but, as always, it's a start ...
This commit is contained in:
Pascal Stumpf
2013-07-22 18:44:04 +02:00
committed by Jon Trulson
parent 0c165f56f5
commit 7e0a9517e3
65 changed files with 259 additions and 152 deletions

View File

@@ -46,6 +46,7 @@
#include "ilpipelem.h"
#include "ilerrors.h"
#include <Xm/XmPrivate.h>
#define X_COLOR_MAX 65535 /* max value for X colormap RGB
value */
@@ -318,10 +319,11 @@ double spreadFactor;
/* Use the grays if the same number, else deallocate them.
*/
context->error = IL_OK; /* assume no errors */
if (pXWC->pGrays)
if (pXWC->pGrays) {
if (pXWC->nGrays == nGrays)
return TRUE;
else ilFreeColorData (pXWC, IL_FREE_XGRAYS);
}
if (nGrays > 256)
return FALSE; /* EXIT */

View File

@@ -38,6 +38,7 @@
***-------------------------------------------------------------------*/
#include "ilint.h"
#include "ilpipeint.h"
#include "ilpipelem.h"
#include "ilconvert.h"
#include "ilerrors.h"

View File

@@ -50,11 +50,11 @@ const ilImageDes ilBitonal0WhiteImageDes = { /* IL_DES_BITONAL */
/* blackIsZero */ FALSE,
/* nSamplesPerPixel */ 1,
/* noLongerUsed */ 0x10001,
/* compInfo.g3 */ {0},
/* compInfo.g3 */ { {0} },
/* reserved */ {0, 0, 0, 0},
/* flags */ 0,
/* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* nLevelsPerSample */ 2
/* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } },
/* nLevelsPerSample */ { 2 }
};
const ilImageDes ilGray256ImageDes = { /* IL_DES_GRAY */
@@ -63,11 +63,11 @@ const ilImageDes ilGray256ImageDes = { /* IL_DES_GRAY */
/* blackIsZero */ TRUE,
/* nSamplesPerPixel */ 1,
/* noLongerUsed */ 0x10001,
/* compInfo.g3 */ {0},
/* compInfo.g3 */ { {0} },
/* reserved */ {0, 0, 0, 0},
/* flags */ 0,
/* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* nLevelsPerSample */ 256
/* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } },
/* nLevelsPerSample */ { 256 }
};
const ilImageDes ilRGB256ImageDes = { /* IL_DES_RGB */
@@ -76,11 +76,11 @@ const ilImageDes ilRGB256ImageDes = { /* IL_DES_RGB */
/* blackIsZero */ FALSE,
/* nSamplesPerPixel */ 3,
/* noLongerUsed */ 0x10001,
/* compInfo.g3 */ {0},
/* compInfo.g3 */ { {0} },
/* reserved */ {0, 0, 0, 0},
/* flags */ 0,
/* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* nLevelsPerSample */ 256, 256, 256
/* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } },
/* nLevelsPerSample */ { 256, 256, 256 }
};
const ilImageDes ilYCbCrImageDes = { /* IL_DES_YCBCR */
@@ -89,12 +89,12 @@ const ilImageDes ilYCbCrImageDes = { /* IL_DES_YCBCR */
/* blackIsZero */ FALSE,
/* nSamplesPerPixel */ 3,
/* noLongerUsed */ 0x10001,
/* compInfo.g3 */ {0},
/* compInfo.g3 */ { {0} },
/* reserved */ {0, 0, 0, 0},
/* flags */ 0,
/* typeInfo.YCbCr */ {0, 255, 1, 1, 128, 255, 1, 1, 128, 255, 1, 1,
2990, 5870, 1140, 0},
/* nLevelsPerSample */ 256, 256, 256
/* typeInfo.YCbCr */ { { { { 0, 255, 1, 1 }, { 128, 255, 1, 1 }, { 128, 255, 1, 1 } },
2990, 5870, 1140, 0} },
/* nLevelsPerSample */ { 256, 256, 256 }
};
const ilImageDes ilYCbCr2ImageDes = { /* IL_DES_YCBCR_2 */
@@ -103,12 +103,12 @@ const ilImageDes ilYCbCr2ImageDes = { /* IL_DES_YCBCR_2 */
/* blackIsZero */ FALSE,
/* nSamplesPerPixel */ 3,
/* noLongerUsed */ 0x10001,
/* compInfo.g3 */ {0},
/* compInfo.g3 */ { {0} },
/* reserved */ {0, 0, 0, 0},
/* flags */ 0,
/* typeInfo.YCbCr */ {0, 255, 1, 1, 128, 255, 2, 2, 128, 255, 2, 2,
2990, 5870, 1140, 0},
/* nLevelsPerSample */ 256, 256, 256
/* typeInfo.YCbCr */ { { { { 0, 255, 1, 1 }, { 128, 255, 2, 2 }, { 128, 255, 2, 2 } },
2990, 5870, 1140, 0} },
/* nLevelsPerSample */ { 256, 256, 256 }
};
const ilImageDes ilPaletteImageDes = { /* IL_DES_PALETTE */
@@ -117,11 +117,11 @@ const ilImageDes ilPaletteImageDes = { /* IL_DES_PALETTE */
/* blackIsZero */ FALSE,
/* nSamplesPerPixel */ 1,
/* noLongerUsed */ 0x10001,
/* compInfo.g3 */ {0},
/* compInfo.g3 */ { {0} },
/* reserved */ {0, 0, 0, 0},
/* flags */ 0,
/* typeInfo.YCbCr */ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
/* nLevelsPerSample */ 256
/* typeInfo.YCbCr */ { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, 0, 0, 0, 0 } },
/* nLevelsPerSample */ { 256 }
};
@@ -147,16 +147,16 @@ const unsigned char ilBitReverseTable [256] =
const ilImageFormat ilBitImageFormat = /* IL_FORMAT_BIT */
{ IL_SAMPLE_PIXELS, IL_MSB_FIRST, 32, 0, 0, 0, 0, 1 };
{ IL_SAMPLE_PIXELS, IL_MSB_FIRST, 32, { 0, 0, 0, 0 }, { 1 } };
const ilImageFormat ilByteImageFormat = /* IL_FORMAT_BYTE */
{ IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, 0, 0, 0, 0, 8 };
{ IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, { 0, 0, 0, 0 }, { 8 } };
const ilImageFormat il3BytePixelImageFormat = /* IL_FORMAT_3BYTE_PIXEL */
{ IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, 0, 0, 0, 0, 8, 8, 8 };
{ IL_SAMPLE_PIXELS, IL_MSB_FIRST, 8, { 0, 0, 0, 0 }, { 8, 8, 8 } };
const ilImageFormat il3BytePlaneImageFormat = /* IL_FORMAT_3BYTE_PLANEL */
{ IL_SAMPLE_PLANES, IL_MSB_FIRST, 8, 0, 0, 0, 0, 8, 8, 8 };
{ IL_SAMPLE_PLANES, IL_MSB_FIRST, 8, { 0, 0, 0, 0 }, { 8, 8, 8 } };
/* Table of shift values, indexed by YCbCr subsample values (1, 2 or 4) */

View File

@@ -75,4 +75,10 @@ IL_EXTERN ilBool _ilDecompPackbits (
ilImageFormat *pimformat
);
IL_EXTERN ilBool _ilDecompJPEG (
ilPipe pipe,
ilPipeInfo *pInfo,
ilImageDes *pDes
);
#endif

View File

@@ -389,12 +389,12 @@ unsigned long *pNLines
if ( tag_bit ) {
pPriv->srcpos++;
if (error = _ilDecompG3Line(pPriv,dstImageP) )
if ((error = _ilDecompG3Line(pPriv,dstImageP)) )
return error;
}
else {
pPriv->srcpos++;
if (error = _ilDecompG4Line(pPriv,pRefLine,dstImageP) )
if ((error = _ilDecompG4Line(pPriv,pRefLine,dstImageP)) )
return error;
}
@@ -402,7 +402,7 @@ unsigned long *pNLines
if ( ( !Is_EOLs) && ( ( temp = pPriv->srcpos % 8) != 0 ) )
pPriv->srcpos += (8-temp) ;
if (error = _ilDecompG3Line(pPriv,dstImageP) )
if ((error = _ilDecompG3Line(pPriv,dstImageP)) )
return error;
} /* is 2d coding */

View File

@@ -564,7 +564,7 @@ unsigned long *pNLines
while ( nLines-- > 0 )
{
if (error = _ilDecompG4Line(pPriv,pRefLine,dstImageP) )
if ((error = _ilDecompG4Line(pPriv,pRefLine,dstImageP)) )
return error;
pRefLine = dstImageP;

View File

@@ -179,3 +179,8 @@ IL_EXTERN const ilDecompG4HuffTableRec ilArFax1DDecodeBlack[G4K_BlackTableSize];
IL_EXTERN const ilDecompG4HuffTableRec ilArFax2DDecodeTable[G4K_DecodeTableSize];
IL_EXTERN ilError _ilDecompG4Line(
register ilDecompG3G4PrivPtr pPriv,
ilPtr pRefLine,
ilPtr dstImageP
);

View File

@@ -86,7 +86,7 @@ static ilError ilDecompCleanup (
/* Cleanup from JPEG decode, but only if firstStrip setup done */
if (!pPriv->firstStrip) {
if (pPriv->pJPEGPriv)
if (error = iljpgDecodeCleanup (pPriv->pJPEGPriv))
if ((error = iljpgDecodeCleanup (pPriv->pJPEGPriv)))
return error;
if (pPriv->pJPEGData)
return iljpgFreeData (pPriv->pJPEGData);
@@ -120,7 +120,7 @@ static ilError ilDecompRawExecute (
/* If first strip, setup iljpg data and call iljpg Init() function */
if (pPriv->firstStrip) {
_ilJPEGTablesIn ((ilJPEGData *)pSrcImage->pCompData, &pPriv->jpgData);
if (error = iljpgDecodeInit (&pPriv->jpgData, &pPriv->pJPEGPriv))
if ((error = iljpgDecodeInit (&pPriv->jpgData, &pPriv->pJPEGPriv)))
return error;
pPriv->firstStrip = FALSE;
}
@@ -167,9 +167,9 @@ static ilError ilDecompJIFExecute (
if (firstStrip) {
pPriv->streamRec.pData = pData->pSrcImage->plane[0].pPixels;
pPriv->streamRec.nBytesLeft = pData->compressed.nBytesToRead;
if (error = iljpgDecodeJIF (&pPriv->streamRec, &pPriv->pJPEGData))
if ((error = iljpgDecodeJIF (&pPriv->streamRec, &pPriv->pJPEGData)))
return error;
if (error = iljpgDecodeInit (pPriv->pJPEGData, &pPriv->pJPEGPriv))
if ((error = iljpgDecodeInit (pPriv->pJPEGData, &pPriv->pJPEGPriv)))
return error;
}
@@ -184,8 +184,8 @@ static ilError ilDecompJIFExecute (
if ((pPriv->nLinesWritten + pPriv->stripHeight) > pPriv->jpgData.height)
*pNLines = pPriv->jpgData.height - pPriv->nLinesWritten;
else *pNLines = pPriv->stripHeight;
if (error = iljpgDecodeExecute (pPriv->pJPEGPriv, &pPriv->streamRec, FALSE, *pNLines,
pPixels, nBytesPerRow))
if ((error = iljpgDecodeExecute (pPriv->pJPEGPriv, &pPriv->streamRec, FALSE, *pNLines,
pPixels, nBytesPerRow)))
return error;
/* Handle based on whether firstStrip and/or last strip:
@@ -212,7 +212,7 @@ static ilError ilDecompJIFExecute (
/* Called by ilDecompress() when pipe image is JPEG compressed. Add a filter to
decompress the pipe image.
*/
IL_PRIVATE ilBool _ilDecompJPEG (
ilBool _ilDecompJPEG (
ilPipe pipe,
ilPipeInfo *pInfo,
ilImageDes *pDes

View File

@@ -1027,7 +1027,7 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette (
int i, shifts[3], nColors;
const unsigned short *pMulTable[3]; /* dither other than 484 only: pMul? */
static ilConvertToPaletteInfo defaultConvert =
{IL_DIFFUSION, 4, 8, 4, 8, IL_PALETTE, (ilObject)NULL};
{IL_DIFFUSION, { 4, 8, 4 }, 8, IL_PALETTE, (ilObject)NULL};
/* Init to null those things freed by "cleanup" if error. */

View File

@@ -292,10 +292,11 @@ register int rowBitAlign, nBits, nSamplesPerPixel, i;
while (nSamplesPerPixel-- > 0) {
nBits = *pNBits++;
if (nBits > 8)
if (nBits > 8) {
if (nBits <= 16)
nBits = 16;
else nBits = 32;
}
if (pYCbCr) {
i = width >> _ilSubsampleShift[pYCbCr->subsampleHoriz];
if (i <= 0) i = 1;
@@ -373,9 +374,9 @@ register ilYCbCrSampleInfo *pYCbCr;
else {
pPixels = (ilPtr)IL_MALLOC (nBytesToAlloc);
if (!pPixels) { /* error; free those already created */
while (plane != 0) {
while ((plane != 0)) {
plane--;
if (pPixels = pImage->i.plane[plane].pPixels)
if ((pPixels = pImage->i.plane[plane].pPixels))
IL_FREE (pPixels);
}
pImage->i.clientPixels = TRUE; /* so IL does not deallocate them */
@@ -500,7 +501,7 @@ ilError error;
}
/* Validate pDes: don't allow user-defined types. */
if (context->error = _ilValidateDesFormat (FALSE, pDes, (ilImageFormat *)NULL))
if ((context->error = _ilValidateDesFormat (FALSE, pDes, (ilImageFormat *)NULL)))
return (ilInternalImage)NULL;
/* Create the object and add it to context. */
@@ -564,7 +565,7 @@ ilError error;
pImage->i.pPalette = (unsigned short *)NULL;
pImage->i.clientPalette = TRUE;
if (error = _ilMallocImagePixels (pImage)) {
if ((error = _ilMallocImagePixels (pImage))) {
ilDestroyObject ((ilObject)pImage);
context->error = error;
return (ilInternalImage)NULL;
@@ -665,7 +666,7 @@ int plane, nPlanes;
}
/* Validate pDes and pFormat: do allow user-defined types. */
if (context->error = _ilValidateDesFormat (TRUE, pInfo->pDes, pInfo->pFormat))
if ((context->error = _ilValidateDesFormat (TRUE, pInfo->pDes, pInfo->pFormat)))
return (ilClientImage)NULL;
/* Create the object and add it to context. */
@@ -733,7 +734,7 @@ int plane, nPlanes;
pImage->i.plane[plane] = pInfo->plane[plane];
}
else { /* no pixels from client; allocate them here if uncompressed image */
if (error = _ilMallocImagePixels (pImage)) {
if ((error = _ilMallocImagePixels (pImage))) {
ilDestroyObject ((ilObject)pImage);
context->error = error;
return (ilClientImage)NULL;

View File

@@ -186,7 +186,7 @@ iljpgError iljpgDecodeExecute (
/* Reset Huffman decoding: beginning of a strip/restart interval */
if (doReset) {
if (error = _iljpgDehuffReset (pPriv))
if ((error = _iljpgDehuffReset (pPriv)))
return error;
}
@@ -201,7 +201,7 @@ iljpgError iljpgDecodeExecute (
If a restart interval and mcu count >, do a reset/restart.
*/
if (restartInterval && (pPriv->mcuRestartCount >= restartInterval)) {
if (error = _iljpgDehuffReset (pPriv))
if ((error = _iljpgDehuffReset (pPriv)))
return error;
pPriv->mcuRestartCount = 0;
}
@@ -212,8 +212,8 @@ iljpgError iljpgDecodeExecute (
for (v = 0, bY = pComp->y; v < pComp->vertFactor; v++, bY += 8) {
for (h = 0, bX = pComp->x; h < pComp->horiFactor; h++, bX += 8) {
if (error = _iljpgDehuffExecute (pPriv, stream, comp, outHuff,
&blockType))
if ((error = _iljpgDehuffExecute (pPriv, stream, comp, outHuff,
&blockType)))
return error;
/* Add previous DC to this one, save away for next */

View File

@@ -172,9 +172,9 @@ iljpgError iljpgDecodeJIF (
/* DRI: get value and save into restartInterval */
case ILJPGM_DRI:
if (error = iljpgGet2Bytes (stream, &value)) /* length */
if ((error = iljpgGet2Bytes (stream, &value))) /* length */
goto JIFError;
if (error = iljpgGet2Bytes (stream, &value)) /* restart interval */
if ((error = iljpgGet2Bytes (stream, &value))) /* restart interval */
goto JIFError;
pData->restartInterval = value;
break;
@@ -182,15 +182,15 @@ iljpgError iljpgDecodeJIF (
/* Start Of Frame 0 (SOF0): save Q table indices; note marker seen. */
case ILJPGM_SOF0:
SOF0Found = TRUE;
if (error = iljpgGet2Bytes (stream, &value)) /* length */
if ((error = iljpgGet2Bytes (stream, &value))) /* length */
goto JIFError;
if (!ILJPG_DECODE_GET_BYTE (stream, value, error))
goto JIFError;
if (value != 8) /* precision != 8; not supported */
goto BadJIFData;
if (error = iljpgGet2Bytes (stream, &pData->height))
if ((error = iljpgGet2Bytes (stream, &pData->height)))
goto JIFError;
if (error = iljpgGet2Bytes (stream, &pData->width))
if ((error = iljpgGet2Bytes (stream, &pData->width)))
goto JIFError;
if (!ILJPG_DECODE_GET_BYTE (stream, nFrameComps, error))
goto JIFError;
@@ -218,7 +218,7 @@ iljpgError iljpgDecodeJIF (
Multiple tables ("n") can be defined: n = (length-2)/65;
*/
case ILJPGM_DQT:
if (error = iljpgGet2Bytes (stream, &length)) /* length */
if ((error = iljpgGet2Bytes (stream, &length))) /* length */
goto JIFError;
length -= 2; /* includes itself */
while (length > 0) {
@@ -254,7 +254,7 @@ iljpgError iljpgDecodeJIF (
4 AC or DC tables are allowed,used by "extended" DCT mode.
*/
case ILJPGM_DHT:
if (error = iljpgGet2Bytes (stream, &length))
if ((error = iljpgGet2Bytes (stream, &length)))
goto JIFError;
length -= 2; /* length includes itself */
while (length > 0) {
@@ -307,7 +307,7 @@ iljpgError iljpgDecodeJIF (
SOSFound = TRUE; /* terminate while loop */
if (!SOF0Found) /* SOS before SOF0 is an error */
goto BadJIFData;
if (error = iljpgGet2Bytes (stream, &value)) /* length */
if ((error = iljpgGet2Bytes (stream, &value))) /* length */
goto JIFError;
if (!ILJPG_DECODE_GET_BYTE (stream, value, error)) /* Ns (0..3) */
@@ -357,15 +357,15 @@ iljpgError iljpgDecodeJIF (
goto BadJIFData;
} /* END each scan header component */
if (error = iljpgSkipBytes (stream, 3)) /* skip Ss, Se, Ah/Al */
if ((error = iljpgSkipBytes (stream, 3))) /* skip Ss, Se, Ah/Al */
goto JIFError;
break;
/* All other markers have lengths: get length and skip length-2 bytes */
default:
if (error = iljpgGet2Bytes (stream, &value))
if ((error = iljpgGet2Bytes (stream, &value)))
goto JIFError;
if (error = iljpgSkipBytes (stream, value - 2)) /* "length" already skipped */
if ((error = iljpgSkipBytes (stream, value - 2))) /* "length" already skipped */
goto JIFError;
break;
} /* END switch marker */

View File

@@ -57,7 +57,7 @@ _gotoLabel: \
/* compute 2-D DCT descaling matrix */
static _il_fwft_rev_scale (
static void _il_fwft_rev_scale (
iljpgPtr q, /* pointer to quantization matrix */
float *s /* pointer to pointer to descaling matrix */
)

View File

@@ -394,14 +394,14 @@ iljpgError _iljpgDehuffInit (
/* Build lookup tables from DC/AC tables from caller (*pPriv->pData) */
for (i = 0; i < 4; i++) {
if (pTable = pData->DCTables[i]) {
if (error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS,
&pHuffPriv->table_set_dc[i]))
if ((pTable = pData->DCTables[i])) {
if ((error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS,
&pHuffPriv->table_set_dc[i])))
return error;
}
if (pTable = pData->ACTables[i]) {
if (error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS,
&pHuffPriv->table_set_ac[i]))
if ((pTable = pData->ACTables[i])) {
if ((error = build_huffman_tables (pTable, (pTable+16), LOOKUP_BITS,
&pHuffPriv->table_set_ac[i])))
return error;
}
}

View File

@@ -44,6 +44,7 @@
#include <stdlib.h>
#include "ilcodec.h"
#include "ilint.h"
#include "ilimage.h"
#include "ilpipelem.h"
@@ -1102,7 +1103,7 @@ ilBool constantStrip, haveConsumerImage, insertCopyFilter;
pPipe->image.info.constantStrip = pDstData->constantStrip;
pPipe->image.info.stripHeight = pDstData->stripHeight;
}
if (pDes = pDstData->pDes) {
if ((pDes = pDstData->pDes)) {
if (pDes->type == IL_PALETTE) {
if (pDstData->pPalette)
pPipe->image.info.pPalette = pDstData->pPalette;

View File

@@ -41,6 +41,7 @@
#include "ilpipelem.h"
#include "ilscaleint.h"
#include "ilerrors.h"
#include "ilconvert.h"
#define LONGSZ 4
#ifdef LSB_BIT_ORDER

View File

@@ -216,8 +216,8 @@ register ilBool bigEndian;
else pFileTag++;
}
if (tagFound) {
mallocSize += sizeof (ilFileTag) +
(pFileTag->length * _ilTagTypeItemSizes [pFileTag->type] + 3) & ~3;
mallocSize += (sizeof (ilFileTag) +
(pFileTag->length * _ilTagTypeItemSizes [pFileTag->type] + 3)) & ~3;
*ppTag++ = (ilFileTag *)pFileTag;
}
else *ppTag++ = (ilFileTag *)NULL;
@@ -384,7 +384,7 @@ static void ilAddImageToList (
/* Main image: if page # present, add to list in page order, else add to end */
case mainImage:
if (pFileImage->p.nPages < 0) { /* no page #; add to end of list */
if (pFileImage->p.pPrev = (ilFileImage)pFile->pFileImageTail)
if ((pFileImage->p.pPrev = (ilFileImage)pFile->pFileImageTail))
pFileImage->p.pPrev->pNext = (ilFileImage)pFileImage;
else pFile->pFileImageHead = pFileImage;
}
@@ -1061,7 +1061,7 @@ register ilBool bigEndian;
/* Add file image to list, if supported. An error is returned only if
the file image is malformed; not if it is just unsupported.
*/
if (error = ilReadTagsAndAddImageToList (pFile, &pPrevFileImage, pFileImage))
if ((error = ilReadTagsAndAddImageToList (pFile, &pPrevFileImage, pFileImage)))
goto LFIFatalError; /* fatal error returned; EXIT */
/* Read and flip offset to next IFD, at end of tags; save in pFile. */

View File

@@ -298,9 +298,9 @@ int stripOffsetsIndex, stripByteCountsIndex, colorMapIndex,
|| (pACTag->nItems != nSamples) || (pACTag->type != IL_TAG_LONG))
return IL_ERROR_FILE_MALFORMED_TAG;
if (error = ilReadJPEGTags (pPriv->pFile, nSamples, (long *)pQTag->pItems,
if ((error = ilReadJPEGTags (pPriv->pFile, nSamples, (long *)pQTag->pItems,
(long *)pDCTag->pItems, (long *)pACTag->pItems,
(ilJPEGData *)pPriv->pCompData))
(ilJPEGData *)pPriv->pCompData)))
return error;
/* If restartInterval tag present, store value else default to 0 */
@@ -332,7 +332,7 @@ int stripOffsetsIndex, stripByteCountsIndex, colorMapIndex,
hasCountBug = FALSE;
hasOffsetBug = FALSE;
if (pSoftwareTag = tags[softwareIndex]) {
if ((pSoftwareTag = tags[softwareIndex])) {
pName = (char *)pSoftwareTag->pItems;
if ((pSoftwareTag->nItems >= 7) && (pName[0] == 'H') && (pName[1] == 'P')
&& (pName[2] == ' ') && (pName[3] == 'I') && (pName[4] == 'L')