a56a50def2f2b52b39edf28d23ee8c4df43ad157 markd Sat Aug 10 02:08:21 2024 -0700 fix issue found by Angie where some of the bit function would SEGV because the bit count type was change from and int an unsigned 64-bit int and some code counted on it going negative. This provides a typedef for bit counts which is a signed 64-bit types diff --git src/hg/mouseStuff/regionPicker/regionPicker.c src/hg/mouseStuff/regionPicker/regionPicker.c index 6def31f..6a927b6 100644 --- src/hg/mouseStuff/regionPicker/regionPicker.c +++ src/hg/mouseStuff/regionPicker/regionPicker.c @@ -2,30 +2,31 @@ /* Copyright (C) 2013 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" #include "obscure.h" #include "bits.h" #include "dnautil.h" #include "hdb.h" #include "featureBits.h" #include "axt.h" #include "htmshell.h" +#include "inttypes.h" /* Command line overridable variables. */ char *clRegion = "genome"; int bigWinSize = 500000; int bigStepSize = 100000; int smallWinSize = 125; double threshold = 0.8; int picksPer = 5; char *htmlOutput = NULL; char *avoidFile = NULL; int randSeed = 12345; boolean printWin = FALSE; @@ -252,31 +253,31 @@ } void maskFeatures(char *database, struct sqlConnection *conn, char *chrom, int chromSize, Bits *maskBits) /* Mask out bits we're not interested in for conservation. */ { fbOrTableBits(database, maskBits, "gap", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "refGene:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "mrna:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "ensGene:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "softberryGene:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "twinscan:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "xenoMrna:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "intronEst:exon:12", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "anyMrnaCov", chrom, chromSize, conn); fbOrTableBits(database, maskBits, "rmsk", chrom, chromSize, conn); -printf("%s: %lld bits masked\n", chrom, bitCountRange(maskBits, 0, chromSize)); +printf("%s: %" PRId64 " bits masked\n", chrom, bitCountRange(maskBits, 0, chromSize)); } void axtSetBits(struct axt *axt, int chromSize, Bits *aliBits, Bits *matchBits) /* Set bits where there are alignments and matches. */ { char q, t, *qSym = axt->qSym, *tSym = axt->tSym; int i, symCount = axt->symCount; int tPos = axt->tStart; assert(axt->tStrand == '+'); for (i=0; i<symCount; ++i) { assert(tPos < chromSize); q = qSym[i]; t = tSym[i];