3e0c0cd8668c45d82cbc80e42fb79ac3a9fd7e9a hiram Tue Nov 24 15:31:49 2015 -0800 fixup gcc warnings for -Wunused-but-set-variable refs #16121 diff --git src/lib/basicBed.c src/lib/basicBed.c index e344c81..9578abb 100644 --- src/lib/basicBed.c +++ src/lib/basicBed.c @@ -1355,32 +1355,30 @@ asStandard = asParseText(asStandardText); result = asCompareObjs("Yours", asYours, "BED Standard", asStandard, numColumnsToCheck, NULL, abortOnDifference); freeMem(asStandardText); asObjectFreeList(&asStandard); return result; } void loadAndValidateBed(char *row[], int bedFieldCount, int fieldCount, struct lineFile *lf, struct bed * bed, struct asObject *as, boolean isCt) /* Convert a row of strings to a bed and validate the contents. Abort with message if invalid data. Optionally validate bedPlus via asObject. * If a customTrack, then some errors are tolerated. */ { int count; int *blockSizes = NULL; int *chromStarts; -int *expIds; -float *expScores; bed->chrom = row[0]; // note this value is not cloned for speed, callers may need to clone it. // This check is usually redundant since the caller should be checking it against actual chromInfo names // however hgLoadBed might not always have that info available. if (strlen(bed->chrom) >= BB_MAX_CHROM_STRING) // must leave room for 0 terminator lineFileAbort(lf, "chrom [%s] is too long (must not exceed %d characters)", bed->chrom, BB_MAX_CHROM_STRING - 1); if (strlen(bed->chrom) < 1) lineFileAbort(lf, "chrom cannot be blank or empty"); lineFileAllInts(lf, row, 1, &bed->chromStart, FALSE, 4, "integer", FALSE); lineFileAllInts(lf, row, 2, &bed->chromEnd, FALSE, 4, "integer", FALSE); if (bed->chromEnd < bed->chromStart) @@ -1544,50 +1542,46 @@ lineFileAbort(lf, "BED blocks must span chromStart to chromEnd. (chromStart + " "chromStarts[last] + blockSizes[last]) must equal chromEnd."); } } if (bedFieldCount > 12) // get the microarray/colored-exon fields { lineFileAllInts(lf, row, 12, &bed->expCount, TRUE, 4, "integer", TRUE); if (!(bed->expCount >= 1)) lineFileAbort(lf, "Expecting expCount (%d) to be 1 or more.", bed->expCount); if (isCt) { AllocArray(bed->expIds,bed->expCount+1); // having +1 allows us to detect incorrect size count = lineFileAllIntsArray(lf, row, 13, bed->expIds, bed->expCount+1, TRUE, 4, "integer", TRUE); - expIds = bed->expIds; } else { count = lineFileAllIntsArray(lf, row, 13, tempExpIds, tempArraySize, TRUE, 4, "integer", TRUE); - expIds = tempExpIds; } if (count != bed->expCount) lineFileAbort(lf, "expecting %d elements in expIds list (bed field 14)", bed->expCount); if (bedFieldCount == 15) { if (isCt) { sqlFloatDynamicArray(row[14], &bed->expScores, &count); - expScores = bed->expScores; } else { count = sqlFloatArray(row[14], tempExpScores, tempArraySize); - expScores = tempExpScores; } if (count != bed->expCount) lineFileAbort(lf, "expecting %d elements in expScores list (bed field 15)", bed->expCount); } } /* Check bedPlus fields are formatted right. */ /* This could form the basis of an .as-validator independent of BED. I suppose it could go in asParse.c */ if (as) { struct hash* linkHash = NULL; /* Validate as-fields */ struct asColumn *asCol = NULL; asCol = as->columnList; int i;