d261f558e0a577ee269fe55215505668cdcb6f2a markd Wed Jul 7 07:09:11 2021 -0700 Address several cases of possible uninitialized variables detected by -O3. None of these appear to be actually bugs due to the flow of the code diff --git src/hg/lib/qaSeq.c src/hg/lib/qaSeq.c index ea53412..c51c6f4 100644 --- src/hg/lib/qaSeq.c +++ src/hg/lib/qaSeq.c @@ -261,31 +261,31 @@ struct qaSeq seq; while (qaFastReadNext(lf, &seq.qa, &seq.size, &seq.name)) { seq.qa = cloneMem(seq.qa, seq.size+1); attatchQaInfo(hash, seq.name, seq.qa, seq.size); } lineFileClose(&lf); checkAllPresent(qaList); } static void fillInQac(char *qacName, struct hash *hash, struct qaSeq *qaList) /* Hash contains qaSeq's with DNA sequence but no * quality info. Fill in quality info from .qac file. */ { -boolean isSwapped; +boolean isSwapped = FALSE; FILE *f = qacOpenVerify(qacName, &isSwapped); struct qaSeq *qa; while ((qa = qacReadNext(f, isSwapped)) != NULL) { /* Transfer qa->qa to hash. */ attatchQaInfo(hash, qa->name, qa->qa, qa->size); qa->qa = NULL; qaSeqFree(&qa); } fclose(f); checkAllPresent(qaList); } static struct qaSeq *qaFaRead(char *qaName, char *faName, boolean mustReadQa) @@ -361,31 +361,31 @@ return NULL; AllocVar(qa); qa->name = cloneString(seq.name); qa->size = seq.size; qa->qa = cloneMem(seq.qa, seq.size+1); return qa; } struct qaSeq *qaRead(char *qaName) /* Read in a .qa file (all records) or die trying. */ { struct qaSeq *qa, *qaList = NULL; if (isQacFile(qaName)) { - boolean isSwapped; + boolean isSwapped = FALSE; FILE *f = qacOpenVerify(qaName, &isSwapped); while ((qa = qacReadNext(f, isSwapped)) != NULL) { slAddHead(&qaList, qa); } fclose(f); } else { struct lineFile *lf = lineFileOpen(qaName, TRUE); while ((qa = qaReadNext(lf)) != NULL) { slAddHead(&qaList, qa); } lineFileClose(&lf);