libdthelp: Resolve uninitialized warnings

This commit is contained in:
Peter Howkins
2021-12-20 23:52:12 +00:00
committed by Jon Trulson
parent b807066429
commit 320576e069
18 changed files with 31 additions and 31 deletions

View File

@@ -1221,7 +1221,7 @@ ilPipeInfo info;
ilXWCPtr pXWC;
ilXPrivPtr pPriv;
ilSrcElementData *pSrcData, srcData;
unsigned long bufferSize;
unsigned long bufferSize = 0;
/*
** We need to use the execute fucntion with the ratio parameter.
*/

View File

@@ -440,7 +440,7 @@ ilBool ilCrop (
{
unsigned int state;
ilPipeInfo info;
ilCropPrivptr pPriv;
ilCropPrivptr pPriv = NULL;
ilDstElementData dstdata;
ilImageDes imdes;
ilImageFormat imformat;

View File

@@ -260,7 +260,7 @@ unsigned long *pNLines
ilDecompG3G4PrivPtr pPriv; /* Pointer to private image data */
ilPtr dstImageP; /* Pointer to the Destn. Image */
ilPtr pRefLine; /* Pointer to the Reference line */
ilPtr pRefLine = NULL; /* Pointer to the Reference line */
ilError error; /* Returned error */
int dstBytesPerRow; /* no.of byte per Row in the dest image */
ilBool Is_2DCoding; /* G3 2 D coding is present, if True */

View File

@@ -1024,7 +1024,7 @@ IL_PRIVATE ilBool _ilConvertRGBToPalette (
unsigned short *pPalette;
long *pColorTable;
ilBool diffusion, chooseColors;
int i, shifts[3] = { 0, 0, 0 }, nColors;
int i, shifts[3] = { 0, 0, 0 }, nColors = 0;
const unsigned short *pMulTable[3] = { NULL, NULL, NULL }; /* dither other than 484 only: pMul? */
static ilConvertToPaletteInfo defaultConvert =
{IL_DIFFUSION, { 4, 8, 4 }, 8, IL_PALETTE, (ilObject)NULL};

View File

@@ -323,7 +323,7 @@ IL_PRIVATE ilError _ilMallocImagePixels (
)
{
int plane, nPlanes;
int MCUMinus1;
int MCUMinus1 = 0;
long nBytesToAlloc, nBytesPerRow, allocHeight;
ilPtr pPixels;
long rowBytesPerPlane [IL_MAX_SAMPLES];

View File

@@ -120,7 +120,7 @@ iljpgError iljpgDecodeJIF (
iljpgDataPtr pData;
iljpgBool firstMarker, SOSFound, SOF0Found;
iljpgError error;
int value, nFrameComps, length;
int value, nFrameComps = 0, length;
iljpgPtr *ppTable;
iljpgCompDataPtr pComp;
int i, index;

View File

@@ -200,7 +200,7 @@ static iljpgError build_huffman_tables (
lookup_size,
code, mask;
tree_node *tree_nodes, /* pointer to pool of tree nodes */
*nodep, *leafp, **followp; /* misc aux. tree pointers */
*nodep, *leafp = NULL, **followp; /* misc aux. tree pointers */
LOOKUP *lookup_symb, *lookup_len; /* pointers to lookup tables */
int absize; /* actual number of Huffman-encoded symbols */
int *hufvals, *hufcodes, *huflen; /* intermediate tables */

View File

@@ -784,7 +784,7 @@ ilBool ilScale (
{
unsigned int state;
ilPipeInfo info;
ilScalePrivptr pPriv;
ilScalePrivptr pPriv = NULL;
ilDstElementData dstdata;
ilImageDes imdes;
ilImageFormat imformat;

View File

@@ -490,17 +490,17 @@ static unsigned short tagNumbers [] = {
#define AI_NTAGS (sizeof(tagNumbers) / sizeof (unsigned short))
#define AIL_FATAL_ERROR(_error) {error = (_error); goto AILFatalError; }
ilFileImageRelation imageType;
ilFileImageRelation imageType = mainImage;
ilFileTag *tag [AI_NTAGS];
ilBool present;
ilError error;
ilPtr pTagAlloc;
unsigned long value;
int i, tagIndex, nBits, resolutionUnit, fillOrder;
int i, tagIndex, nBits, resolutionUnit, fillOrder = 0;
unsigned long group3CompData;
unsigned long group4CompData;
ilFileTag *pTag;
ilYCbCrInfo *pYCbCr; /* null if not YCbCr ; else -> des...YCbCr */
ilYCbCrInfo *pYCbCr = NULL; /* null if not YCbCr ; else -> des...YCbCr */
/* Init/zero des and format in *pFileImage.
*/

View File

@@ -164,9 +164,9 @@ ilFileTag *pTag;
int nTags; /* # of tags to read */
unsigned short numbers[MAX_NTAGS]; /* tag ids to read */
ilFileTag *tags [MAX_NTAGS]; /* ptr to returned data */
int stripOffsetsIndex, stripByteCountsIndex, colorMapIndex,
QTablesIndex, DCTablesIndex, ACTablesIndex, softwareIndex,
restartIndex;
int stripOffsetsIndex, stripByteCountsIndex = 0, colorMapIndex,
QTablesIndex = 0, DCTablesIndex = 0, ACTablesIndex = 0, softwareIndex = 0,
restartIndex = 0;
#define ADD_TAG(_index, _tagid) { \
_index = nTags++; \
numbers[_index] = _tagid; \