libdtsearch: Resolve uninitialized warnings
This commit is contained in:
committed by
Jon Trulson
parent
320576e069
commit
182aa9fe5a
@@ -94,7 +94,7 @@ long hilite_cleartext (int parse_type, char *stems, int stemcount)
|
||||
PARG parg;
|
||||
char * (*parser)() = usrblk.dblk->parser;
|
||||
char * (*stemmer)() = usrblk.dblk->stemmer;
|
||||
DtSrHitword *hitwords;
|
||||
DtSrHitword *hitwords = NULL;
|
||||
size_t hitwords_size = 0;
|
||||
long hitwcount = 0;
|
||||
long offset;
|
||||
@@ -158,10 +158,10 @@ long hilite_cleartext (int parse_type, char *stems, int stemcount)
|
||||
hitwords = realloc (hitwords,
|
||||
hitwords_size * sizeof(DtSrHitword) + 16);
|
||||
}
|
||||
if (!hitwords) {
|
||||
fputs (PROGNAME"091 Out of Memory!\n", aa_stderr);
|
||||
DtSearchExit (91);
|
||||
}
|
||||
}
|
||||
if (!hitwords) {
|
||||
fputs (PROGNAME"091 Out of Memory!\n", aa_stderr);
|
||||
DtSearchExit (91);
|
||||
}
|
||||
hitwords[hitwcount].offset = offset;
|
||||
hitwords[hitwcount].length = wordlen;
|
||||
|
||||
@@ -84,8 +84,8 @@ int dbn /* Database number */
|
||||
char *orec; /* ptr to current owner record contents in cache */
|
||||
char *mrec; /* ptr to current member record contents in cache */
|
||||
char *nrec; /* ptr to next member record contents in cache */
|
||||
DB_ADDR mdba; /* db address of current member record */
|
||||
DB_ADDR ndba; /* db address of next member record */
|
||||
DB_ADDR mdba = NULL; /* db address of current member record */
|
||||
DB_ADDR ndba = NULL; /* db address of next member record */
|
||||
INT ordering; /* set order control variable */
|
||||
int stat, compare; /* status code & sort comparison result */
|
||||
SET_ENTRY *set_ptr;
|
||||
|
||||
@@ -811,10 +811,10 @@ LOOKUP_ENTRY * *xlu_ptr /* pointer to lookup table slot for found page*/
|
||||
{
|
||||
LOOKUP_ENTRY *lookup; /* = db_lookup or ix_lookup */
|
||||
int pgtab_sz; /* = db_pgtab_sz or ix_pgtab_sz */
|
||||
long cmp;
|
||||
long cmp = 0;
|
||||
int cnt;
|
||||
int lu_slot, l, u;
|
||||
LOOKUP_ENTRY *lu_ptr, *replu_ptr;
|
||||
int lu_slot = 0, l, u;
|
||||
LOOKUP_ENTRY *lu_ptr = NULL, *replu_ptr;
|
||||
PAGE_ENTRY *pg_ptr;
|
||||
int *lru_ptr;
|
||||
int pg_slot;
|
||||
|
||||
@@ -380,8 +380,8 @@ int *slot_offset, /* slot position offset */
|
||||
F_ADDR *child /* child ptr of located key */
|
||||
)
|
||||
{
|
||||
int cmp, i, l, u, slot_pos;
|
||||
char *node_slot_ptr;
|
||||
int cmp = 0, i = 0, l, u, slot_pos = 0;
|
||||
char *node_slot_ptr = NULL;
|
||||
|
||||
/* perform binary search on node */
|
||||
l = 0;
|
||||
|
||||
@@ -303,7 +303,7 @@ DB_ADDR *db_addr
|
||||
char *fptr;
|
||||
const char *tfptr;
|
||||
int s, i, strfld;
|
||||
FIELD_ENTRY *sfld_ptr;
|
||||
FIELD_ENTRY *sfld_ptr = NULL;
|
||||
SORT_ENTRY *srt_ptr;
|
||||
DB_ADDR *co_ptr, *cm_ptr;
|
||||
|
||||
@@ -402,7 +402,7 @@ DB_ADDR *db_addr
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( strfld >= 0 ) {
|
||||
if ( strfld >= 0 && sfld_ptr) {
|
||||
/* insert the new struct key */
|
||||
if ( key_insert( strfld, rec + sfld_ptr->fd_ptr, dba ) != S_OKAY )
|
||||
return( db_status );
|
||||
|
||||
Reference in New Issue
Block a user