ecbcec2757f571e370e32145d3ac02b448629a21 markd Wed Jan 8 10:06:59 2025 -0800 used char** instead of char*[] to avoid stringop-overflow warning diff --git src/hg/lib/customFactory.c src/hg/lib/customFactory.c index 33240cc..afe8444 100644 --- src/hg/lib/customFactory.c +++ src/hg/lib/customFactory.c @@ -453,45 +453,45 @@ FILE *out = pipelineFile(dataPipe); struct bed *bed; for (bed = track->bedList; bed != NULL; bed = bed->next) { bedOutputN(bed, track->fieldCount, out, '\t', '\n'); } fflush(out); /* help see error from loader failure */ if(ferror(out) || pipelineWait(dataPipe)) pipelineFailExit(track); /* prints error and exits */ unlink(track->dbStderrFile); /* no errors, not used */ pipelineFree(&dataPipe); } return track; } -static struct bed *customTrackBed(char *row[64], int wordCount, int chromSize, struct lineFile *lf) +static struct bed *customTrackBed(char **row, int wordCount, int chromSize, struct lineFile *lf) /* Convert a row of strings to a bed. * Intended to replace old customTrackBed, * currently new code is activated by hg.conf switch */ { struct bed * bed; AllocVar(bed); loadAndValidateBed(row, wordCount, wordCount, lf, bed, NULL, TRUE); if (bed->chromEnd > chromSize) lineFileAbort(lf, "chromEnd larger than chrom %s size (%d > %d)", bed->chrom, bed->chromEnd, chromSize); return bed; } -static struct bed *customTrackBedOld(char *db, char *row[13], int wordCount, +static struct bed *customTrackBedOld(char *db, char **row, int wordCount, struct hash *chromHash, struct lineFile *lf, char *aliasName) /* Convert a row of strings to a bed. */ { struct bed * bed; int count; AllocVar(bed); bed->chrom = hashStoreName(chromHash, aliasName); customFactoryCheckChromNameDb(db, bed->chrom, lf); bed->chromStart = lineFileNeedNum(lf, row, 1); bed->chromEnd = lineFileNeedNum(lf, row, 2); if (bed->chromEnd < 1) lineFileAbort(lf, "chromEnd less than 1 (%d)", bed->chromEnd); if (bed->chromEnd < bed->chromStart) lineFileAbort(lf, "chromStart after chromEnd (%d > %d)",