3dbf0d3c66fadf0e2b0c3ce76fb3f73f7a146434 galt Mon Dec 30 23:09:34 2024 -0800 fixing compiler warnings for cgilib compiling Rocky 9 hgwdev-new. diff --git src/hg/cgilib/hgSeq.c src/hg/cgilib/hgSeq.c index 0922fe8..ef74d91 100644 --- src/hg/cgilib/hgSeq.c +++ src/hg/cgilib/hgSeq.c @@ -6,30 +6,32 @@ #include "hCommon.h" #include "dnautil.h" #include "dnaseq.h" #include "dystring.h" #include "cart.h" #include "cheapcgi.h" #include "hdb.h" #include "web.h" #include "rmskOut.h" #include "fa.h" #include "genePred.h" #include "bed.h" #include "hgSeq.h" #include "trackHub.h" #include "hubConnect.h" +#include "hdb.h" + // primer3 can design primers around exons like exonprimer, but needs some flanking // sequence around the transcript for the first and the last primer const int PRIMER3EXTEND = 200; int hgSeqChromSize(char *db, char *chromName) /* get chrom size if there's a database out there, * otherwise just return 0 */ { int thisSize = 0; if (hDbExists(db)) thisSize = hChromSize(db, chromName); return thisSize; } @@ -221,32 +223,32 @@ #ifdef NEVER void hgSeqOptionsHti(struct hTableInfo *hti) /* Print out HTML FORM entries for gene region and sequence display options. * Use defaults from CGI. */ { hgSeqOptionsHtiCart(hti, NULL); } #endif /* NEVER */ void hgSeqOptions(struct cart *cart, char *db, char *table) /* Print out HTML FORM entries for gene region and sequence display options. */ { struct hTableInfo *hti; -char chrom[32]; -char rootName[256]; +char chrom[HDB_MAX_CHROM_STRING]; +char rootName[HDB_MAX_TABLE_STRING]; if (isCustomTrack(table) || startsWith("hub_", table)) { // we asssume that this is a bigGenePred table if we got here with it hgSeqFeatureRegionOptions(cart, TRUE, TRUE); hgSeqDisplayOptions(cart, TRUE, TRUE, FALSE); return; } else if ((table == NULL) || (table[0] == 0)) { hti = NULL; } else { hParseTableName(db, table, rootName, chrom); @@ -880,31 +882,31 @@ freeMem(sizes); freeMem(exonFlags); freeMem(cdsFlags); } return totalCount; } int hgSeqItemsInRange(char *db, char *table, char *chrom, int chromStart, int chromEnd, char *sqlConstraints) /* Print out dna sequence of all items (that match sqlConstraints, if nonNULL) in the given range in table. Return number of items. */ { struct hTableInfo *hti; struct bed *bedList = NULL; -char rootName[256]; -char parsedChrom[32]; +char rootName[HDB_MAX_TABLE_STRING]; +char parsedChrom[HDB_MAX_CHROM_STRING]; int itemCount; hParseTableName(db, table, rootName, parsedChrom); hti = hFindTableInfo(db, chrom, rootName); if (hti == NULL) webAbort("Error", "Could not find table info for table %s (%s)", rootName, table); bedList = hGetBedRange(db, table, chrom, chromStart, chromEnd, sqlConstraints); itemCount = hgSeqBed(db, hti, bedList); bedFreeList(&bedList); return itemCount; }