1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

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

@ -492,14 +492,14 @@ FormatManPage(
int italicCnt = 0; int italicCnt = 0;
int result = 0; int result = 0;
int cread; int cread;
int lastLen; int lastLen = 0;
int checkLen; int checkLen;
int retWCLen; int retWCLen;
wchar_t lastWC; wchar_t lastWC;
wchar_t retWC; wchar_t retWC;
char *rloc = in_buf; char *rloc = in_buf;
char *retStrPtr; char *retStrPtr;
char c; char c = 0;
char retC; char retC;
Boolean flag = False; Boolean flag = False;
enum State newState; enum State newState;

View file

@ -5091,11 +5091,11 @@ ProcessSDLAttribute(
char *attrValue; char *attrValue;
char **strPtr; char **strPtr;
char numBuf[DTD_NAMELEN+1]; char numBuf[DTD_NAMELEN+1];
char *varOffset1; char *varOffset1 = NULL;
SDLNumber *numPtr1; SDLNumber *numPtr1;
SdlOption *enumPtr1; SdlOption *enumPtr1;
SdlOption attrNum; SdlOption attrNum;
_DtHelpFontValue fontNum; _DtHelpFontValue fontNum = 0;
_DtHelpFontValue *fontPtr1; _DtHelpFontValue *fontPtr1;
const SDLAttribute *pAttr = SDLAttributeList; const SDLAttribute *pAttr = SDLAttributeList;

View file

@ -2789,7 +2789,7 @@ static void SearchIndex(
&indexEntry, &entryLen,indexEntry,entryLen) == 0 &indexEntry, &entryLen,indexEntry,entryLen) == 0
&& SearchForPattern(indexEntry, srchWord, srchWordLen) == True ) ) && SearchForPattern(indexEntry, srchWord, srchWordLen) == True ) )
{ {
_DtHelpGlobSrchHit * hit; _DtHelpGlobSrchHit * hit = NULL;
char * * topicIdList; char * * topicIdList;
HitListAddFound ( curFile, curVol->curIndexXmStr[0], HitListAddFound ( curFile, curVol->curIndexXmStr[0],

View file

@ -1413,7 +1413,7 @@ static enum _DtGrLoadStatus processTiff(
ilFile inFile; ilFile inFile;
ilPipe inPipe; ilPipe inPipe;
ilFileImage inImage; ilFileImage inImage;
const ilImageDes *inDes; const ilImageDes *inDes = 0;
static ilContext IlContext = NULL; static ilContext IlContext = NULL;
Display *dpy = DisplayOfScreen(screen); Display *dpy = DisplayOfScreen(screen);
Drawable drawable = RootWindowOfScreen(screen); Drawable drawable = RootWindowOfScreen(screen);
@ -2832,7 +2832,7 @@ int _DtGrOpenBuffer(
int _DtGrCloseStream( int _DtGrCloseStream(
_DtGrStream *stream) _DtGrStream *stream)
{ {
int status; int status = 0;
if ((stream == NULL) || (stream->type == _DtGrNONE)) if ((stream == NULL) || (stream->type == _DtGrNONE))
return(EOF); /* Failure */ return(EOF); /* Failure */

View file

@ -1677,10 +1677,10 @@ ResolveCell(
CellInfo *ret_info) CellInfo *ret_info)
{ {
int i; int i;
char *id; char *id = NULL;
char *idRefs; char *idRefs;
char *ptr; char *ptr = NULL;
char c; char c = 0;
int count; int count;
int len; int len;
int done; int done;
@ -1690,7 +1690,7 @@ ResolveCell(
_DtCvUnit cellWidth; _DtCvUnit cellWidth;
_DtCvUnit retWidth; _DtCvUnit retWidth;
_DtCvUnit retHeight; _DtCvUnit retHeight;
_DtCvUnit saveTop; _DtCvUnit saveTop = 0;
CellInfo *thisCell = &ret_info[cell]; CellInfo *thisCell = &ret_info[cell];
DataPoint basePt; DataPoint basePt;
_DtCvValue reformat = False; _DtCvValue reformat = False;

View file

@ -397,11 +397,11 @@ _DtCvCheckLineSyntax (
int str_len, int str_len,
_DtCvValue skip_hypen_ck) _DtCvValue skip_hypen_ck)
{ {
int myStrLen; int myStrLen = 0;
int wcFlag; int wcFlag = 0;
void *pChar; void *pChar = NULL;
wchar_t nextChar; wchar_t nextChar;
wchar_t lastChar; wchar_t lastChar = 0;
_DtCvValue lstCharMb = False; _DtCvValue lstCharMb = False;
_DtCvValue nxtCharMb = False; _DtCvValue nxtCharMb = False;

View file

@ -154,7 +154,7 @@ SearchForClosestLine (
_DtCvSelectData *next) _DtCvSelectData *next)
{ {
int i; int i;
int maxI; int maxI = 0;
_DtCvUnit lineY; _DtCvUnit lineY;
_DtCvUnit endX; _DtCvUnit endX;
_DtCvUnit begX; _DtCvUnit begX;

View file

@ -362,7 +362,7 @@ BufCompressedSkip (
BufFilePtr f, BufFilePtr f,
int bytes) int bytes)
{ {
int c; int c = 0;
while (bytes-- && ((c = BufFileGet(f)) != BUFFILEEOF)) while (bytes-- && ((c = BufFileGet(f)) != BUFFILEEOF))
; ;
return c; return c;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -200,7 +200,7 @@ static iljpgError build_huffman_tables (
lookup_size, lookup_size,
code, mask; code, mask;
tree_node *tree_nodes, /* pointer to pool of tree nodes */ 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 */ LOOKUP *lookup_symb, *lookup_len; /* pointers to lookup tables */
int absize; /* actual number of Huffman-encoded symbols */ int absize; /* actual number of Huffman-encoded symbols */
int *hufvals, *hufcodes, *huflen; /* intermediate tables */ int *hufvals, *hufcodes, *huflen; /* intermediate tables */

View file

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

View file

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

View file

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