Index: src/hg/gigAssembler/mendMap/mendMap.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/gigAssembler/mendMap/mendMap.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/hg/gigAssembler/mendMap/mendMap.c	5 Sep 2003 21:30:43 -0000	1.10
+++ src/hg/gigAssembler/mendMap/mendMap.c	7 Jul 2009 18:45:02 -0000	1.11
@@ -185,9 +185,8 @@
 
 int maxMapDif(struct mmClone *a, struct mmClone *b)
 /* Return max distance between clones in map coordinates. */
 {
-int fDif, rDif;
 int aStart, aEnd, bStart, bEnd;
 
 aStart = a->mapPos;
 aEnd = a->mapPos + a->size;
@@ -293,10 +292,8 @@
 struct lineFile *lf = lineFileOpen(fileName, TRUE);
 char *words[7];
 struct mmClone *cloneList = NULL, *clone;
 struct hash *cloneHash = newHash(11);
-struct cloneEnd *ce;
-int endCount;
 
 while (lineFileRow(lf, words))
     {
     if (!sameString(words[3], "0"))
@@ -562,9 +559,8 @@
 struct lineFile *lf = lineFileOpen(fileName, TRUE);
 char *words[12];
 struct overlappingClonePair *ocpList = NULL, *ocp;
 struct hash *ocpHash = newHash(12);
-int score;
 
 while (lineFileRow(lf, words))
     {
     AllocVar(ocp);
@@ -991,10 +987,8 @@
 struct dlNode *n1, *n2;
 struct dlNode *innerStart, *outerEnd;
 struct cloneEnd *ce;
 struct mmClone *clone;
-struct overlappingClonePair *ocp;
-char how;
 struct fitAt *fit;
 int score, minScore;
 int missingOverlap, presentOverlap;
 int overlapCloneCount = 0;
@@ -1187,9 +1181,8 @@
 	struct mmClone *clone, boolean ignoreEnds)
 /* Return orientation of clone relative to other clone in pair based on end matches. 
  * Returns 1 (orientForward) if it appears clone comes after other clone. */
 {
-int orientation = orientUnknown;
 char how, howFlip;
 
 how = ocpHitsHow(ocp, clone, -1, ignoreEnds);
 howFlip = ocpHitsHow(ocp, clone, 1, ignoreEnds);
@@ -1220,16 +1213,15 @@
 	struct hash *ocpHash, boolean ignoreEnds)
 /* Return scored list of all places newbie could fit overlapping member
  * to left in barge. */
 {
-char how, howFlip, newHow;
+char how, howFlip;
 int newbieOrientation = 0, memberOrientation;
 struct dlNode *node, *firstStart, *n1, *n2;
 struct cloneEnd *ce;
 struct mmClone *clone;
 struct overlappingClonePair *ocp;
 struct fitAt *fitList = NULL, *fit;
-int score;
 
 uglyerf("bargeFitListLeft(newbie %s, member %s)\n", newbie->name, member->name);
 ce = memStart->val;
 memberOrientation = ce->orientation;
@@ -1324,9 +1316,9 @@
 	struct hash *ocpHash, boolean ignoreEnds)
 /* Return scored list of all places newbie could fit overlapping member
  * to right in barge. */
 {
-char how, howFlip, newHow;
+char how, howFlip;
 int newbieOrientation = 0, memberOrientation ;
 struct dlNode *node, *lastEnd, *n1, *n2;
 struct cloneEnd *ce;
 struct mmClone *clone;
@@ -1441,9 +1433,8 @@
 /* Attempt to add a clone 'newbie' to barge via connection with 'member'. */
 {
 struct dlNode *memStart, *memEnd;	/* Start/end nodes of member. */
 struct overlappingClonePair *ocp;
-int ori;
 struct fitAt *leftFits, *rightFits, *fitList, *fit;
 
 logIt("bargeAdd: newbie %s, member %s\n", newbie->name, member->name);
 dumpCloneEnds(barge->cloneEndList, logFile);
@@ -1533,9 +1524,8 @@
 struct dlNode *n1;
 struct cloneEnd *ce;
 boolean leftOk, rightOk, addAfter;
 struct overlappingClonePair *ocp;
-char *newbieName;
 
 /* Figure out which clone is already part of big barge. */
 if (joiningOcp->a->barge == big)
     {
@@ -2273,9 +2263,8 @@
 struct mmClone *findNextUnenclosed(struct dlNode *node)
 /* Find next clone in double-linked clone end list that is
  * not enclosed. */
 {
-struct mmClone *clone = NULL;
 struct cloneEnd *ce;
 
 for (; !dlEnd(node); node = node->next)
     {
@@ -2432,13 +2421,9 @@
 {
 struct cloneRef *aEnd = NULL, *bStart = NULL;
 struct bepRef *aBep = NULL, *bBep = NULL, *joiningBep = NULL, *bepRef;
 struct bep *bep;
-struct dlNode *node;
 int bigEnough = 200000;
-int aEndSize = 0, bStartSize = 0;
-struct mmClone *clone, *lastClone = NULL;
-struct cloneEnd *ce;
 boolean bridged = FALSE;
 
 aEnd = getLastClones(aBarge, bigEnough, ocpHash);
 bStart = getFirstClones(bBarge, bigEnough, ocpHash);
@@ -2474,16 +2459,8 @@
 slFreeList(&bStart);
 return bridged;
 }
 
-char *naForNull(char *s)
-/* Return s, or if s is null "n/a" */
-{
-if (s != NULL)
-    return s;
-return "n/a";
-}
-
 char cloneDir(struct cloneEnd *ce)
 /* Return ? + or - for direction clone goes. */
 {
 int o = ce->orientation;
@@ -2519,9 +2496,9 @@
     cloneCount = dlCount(barge->cloneList);
     for (eNode = barge->cloneEndList->head; !dlEnd(eNode); eNode = eNode->next)
         {
 	char os, ot, is, it;
-	int prevOverlap, nextOverlap;
+	int nextOverlap;
 
 	ce = eNode->val;
 	if (ce->isStart)
 	    {
@@ -2607,16 +2584,12 @@
 struct dlNode *bNode, *eNode;
 int pos = 0;
 struct barge *barge;
 struct cloneEnd *ce;
-struct mmClone *clone;
-boolean lastBridged = FALSE;
-
 
 for (bNode = bargeList->head; !dlEnd(bNode); bNode = bNode->next)
     {
-    struct mmClone *clone, *lastUnenclosed = NULL, *nextUnenclosed;
-    struct overlappingClonePair *ocp;
+    struct mmClone *clone, *lastUnenclosed = NULL;
 
     barge = bNode->val;
     for (eNode = barge->cloneEndList->head; !dlEnd(eNode); eNode = eNode->next)
         {
@@ -2678,8 +2651,9 @@
     if (ce->clone == clone && !ce->isStart)
         return ce;
     }
 errAbort("Internal error. Couldn't find end of %s", clone->name);
+return NULL;
 }
 
 void setEnclosedPos(struct dlList *bargeList, struct hash *ocpHash, struct hash *bepHash)
 /* Set mmPos field of all enclosed clones. */
@@ -2687,9 +2661,8 @@
 struct dlNode *bNode, *eNode, *nextEnode = NULL;
 int lastPos = 0;
 struct barge *barge;
 struct cloneEnd *ce, *nextKnownCe, *endCe;
-struct mmClone *clone;
 int lastKnownPos, nextKnownPos, knownSpan;
 int encCount;
 int i;
 
@@ -2756,9 +2729,9 @@
 void orderAndOrientBarges(struct dlList *bargeList, struct hash *ocpHash, struct hash *bepHash)
 /* Orient barges according to map and set barge->mapPos field
  * according to first clone. */
 {
-struct dlNode *bNode, eNode;
+struct dlNode *bNode;
 struct barge *barge;
 
 for (bNode = bargeList->head; !dlEnd(bNode); bNode = bNode->next)
     {
@@ -2829,9 +2802,9 @@
 {
 struct cloneEnd *ce;
 struct barge *barge = NULL;
 struct dlList *bargeList = newDlList();
-int end, lastEnd = -BIGNUM;
+int lastEnd = -BIGNUM;
 struct mmClone *clone;
 struct dlNode *node;
 
 /* Build up barges literally from map positions. */
@@ -2948,16 +2921,13 @@
 {
 char fileName[512];
 struct mmClone *cloneList = NULL, *clone;
 struct hash *cloneHash = NULL;
-struct overlappingClonePair *ocpList = NULL, *ocp;
+struct overlappingClonePair *ocpList = NULL;
 struct hash *ocpHash = NULL;
 struct dlList *bargeList = NULL;
-struct barge  *barge;
-struct dlNode *node;
 struct hash *bepHash = NULL;
 struct bep *bepList = NULL;
-FILE *f;
 
 /* Set up logging of error and status messages. */
 sprintf(fileName, "%s/mmLog.%d", contigDir, version);
 logFile = mustOpen(fileName, "w");

