d61df7dc771a130c58e59709121e41b9ec85b4c8
galt
  Sat Jan 4 21:53:30 2025 -0800
Fixes for the many compiler issues with ArraySize called on NULL. Now compiles without any errors, warnings, or pramga.

diff --git src/hg/snp/snpLoad/snpNcbiToUcsc.c src/hg/snp/snpLoad/snpNcbiToUcsc.c
index b28a820..dabc83b 100644
--- src/hg/snp/snpLoad/snpNcbiToUcsc.c
+++ src/hg/snp/snpLoad/snpNcbiToUcsc.c
@@ -1722,51 +1722,51 @@
 }
 
 
 void checkSubmitters(struct lineFile *lf, int *pSubmitterCount, char *submitters)
 /* Make sure submitterCount matches count of comma-sep'd strings in submitters. */
 {
 if (*pSubmitterCount < 0)
     {
     warn("Looks like submitterCount is missing/NULL for rs%d -- check completeness "
 	 "of ids in SNPSubSNPLink, SubSNP and Batch, and email dbSNP", rsId);
     *pSubmitterCount = 0;
     submitters[0] = '\0';  // instead of "NULL"
     return;
     }
 // subtract one because of comma at end:
-int checkCount = chopCommas(submitters, NULL) - 1;
+int checkCount = chopCommas(submitters, 0) - 1;
 if (checkCount != *pSubmitterCount)
     lineFileAbort(lf, "submitterCount %d does not match number of comma-separated "
 		  "strings %d in submitters (%s) for rs%d.  Check doDbSnp.pl's code that "
 		  "processes submitter data into ucscHandles.",
 		  *pSubmitterCount, checkCount, submitters, rsId);
 }
 
 void processAlleleFreqs(struct lineFile *lf, int *pAlleleFreqCount, char *alleles,
 			float *alleleNs, float *alleleFreqs)
 /* Make sure alleleFreqCount matches count of comma-sep'd strings in alleles.
  * If any alleleNs are non-integer, flag exception.  If alleleFreqs don't sum to
  * 1.0, flag an error. */
 {
 if (*pAlleleFreqCount < 0)
     {
     *pAlleleFreqCount = 0;
     alleles[0] = '\0';
     return;
     }
-int checkCount = chopCommas(alleles, NULL) - 1;
+int checkCount = chopCommas(alleles, 0) - 1;
 if (checkCount != *pAlleleFreqCount)
     lineFileAbort(lf, "alleleFreqCount %d does not match number of comma-separated "
 		  "strings %d in alleles (%s)", *pAlleleFreqCount, checkCount, alleles);
 // Length of alleleNs and alleleFreqs was already checked during parsing.
 int i;
 double total = 0.0;
 boolean nonIntChromCount = FALSE;
 for (i=0;  i < *pAlleleFreqCount;  i++)
     {
     double leftover = alleleNs[i] - trunc(alleleNs[i]);
     if (leftover > ALLELE_N_ROUNDING_ERROR && leftover < 1.0-ALLELE_N_ROUNDING_ERROR)
         nonIntChromCount = TRUE;
     if (alleleFreqs != NULL)
 	total += alleleFreqs[i];
     }