7946141cd5729698aa5dcd3ad56815d9a2f3840a hiram Fri Oct 2 13:15:05 2015 -0700 fixup gcc warnings for -Wunused-but-set-variable refs #16121 diff --git src/ameme/fragFind.c src/ameme/fragFind.c index 98bfddc..8cb12be 100644 --- src/ameme/fragFind.c +++ src/ameme/fragFind.c @@ -156,31 +156,30 @@ bestVal = val; bestIx = i; } } } return bestIx; } static int fuzzValOne(int *table, int oligoSize, int *rcTable) /* Return value of table entry with most number of * matches that are off by no more than one. */ { int tableSize = (1<<(oligoSize+oligoSize)); int tableIx; int bestVal = -0x3ffffff; -int bestIx; for (tableIx = 0; tableIx < tableSize; ++tableIx) { int acc = 0; int mask = 0x3; int maskedIx; int inc = 1; int baseIx; for (baseIx = 0; baseIx<oligoSize; ++baseIx) { maskedIx = (tableIx&(~mask)); if (rcTable) { int mIx = maskedIx; @@ -193,31 +192,30 @@ acc += table[rcTable[mIx]]; } acc += table[maskedIx]; maskedIx += inc; acc += table[maskedIx]; maskedIx += inc; acc += table[maskedIx]; maskedIx += inc; acc += table[maskedIx]; mask <<= 2; inc <<= 2; } if (acc > bestVal) { bestVal = acc; - bestIx = tableIx; } } return tableIx; } static int fuzzValTwo(int *table, int oligoSize, int *rcTable) /* Return value of table entry with most number of * matches that are off by no more than one. */ { int tableSize = (1<<(oligoSize+oligoSize)); int tableIx; int bestVal = -0x3ffffff; int bestIx = 0; for (tableIx = 0; tableIx < tableSize; ++tableIx) @@ -486,39 +484,37 @@ profile[i][j] = invTotal * counts[i][j]; } } } void fragFind(struct seqList *goodSeq, char *badName, int fragSize, int mismatchesAllowed, boolean considerRc, double profile[16][4]) /* Do fast finding of patterns that are in FA file "goodName", but not in FA file * "badName." BadName can be null. Pass in the size of the pattern (fragSize) and * the number of mismatches to pattern you're willing to tolerate (mismatchesAllowed). * It returns the pattern in profile. */ { int *goodTable, *badTable = NULL; int goodCount, badCount = 0; int goodIx; -long startTime; DNA unpacked[17]; if (mismatchesAllowed > 3) errAbort("Sorry, fragFind can only handle 0-3 mismatches."); if (fragSize > 10) errAbort("Sorry, fragFind can only handle fragments up to 10 bases."); -startTime = clock1000(); makeOligoHistogram(NULL, goodSeq, fragSize, &goodTable, &goodCount); if (badName) makeOligoHistogram(badName, NULL, fragSize, &badTable, &badCount); if (badName) { normalizeTable(goodTable, fragSize); normalizeTable(badTable, fragSize); diffTables(goodTable, badTable, fragSize); goodIx = fuzzVal(badTable, fragSize, mismatchesAllowed, considerRc); } else { goodIx = fuzzVal(goodTable, fragSize, mismatchesAllowed, considerRc); } freez(&goodTable);