af856e8ae4df16b4a41609d7ac6e649244682dec braney Tue Jan 7 17:16:27 2025 -0800 Revert "Fixes for the many compiler issues with ArraySize called on NULL. Now compiles without any errors, warnings, or pramga." This reverts commit d61df7dc771a130c58e59709121e41b9ec85b4c8. diff --git src/lib/vcf.c src/lib/vcf.c index 8ab479f..f23e9c5 100644 --- src/lib/vcf.c +++ src/lib/vcf.c @@ -399,31 +399,31 @@ vcfFileErr(vcff, "Expected column %d's name in header to be \"%s\" or \"%s\" " "but got \"%s\"", ix+1, exp1, exp2, words[ix]); } } #define expectColumnName(vcff, exp, words, ix) expectColumnName2(vcff, exp, NULL, words, ix) #define VCF_MIN_COLUMNS 8 char *vcfDefaultHeader = "#CHROM POS ID REF ALT QUAL FILTER INFO"; /* Default header if we have none. */ static void parseColumnHeaderRow(struct vcfFile *vcff, char *line) /* Make sure column names are as we expect, and store genotype sample IDs if any are given. */ { -int wordCount = chopTabs(line+1, 0); +int wordCount = chopTabs(line+1, NULL); char *words[wordCount]; chopTabs(line+1, words); if (wordCount < VCF_MIN_COLUMNS) errAbort("VCF header missing at least one of the required VCF fields"); expectColumnName(vcff, "CHROM", words, 0); expectColumnName(vcff, "POS", words, 1); expectColumnName(vcff, "ID", words, 2); expectColumnName(vcff, "REF", words, 3); expectColumnName(vcff, "ALT", words, 4); expectColumnName2(vcff, "QUAL", "PROB", words, 5); expectColumnName(vcff, "FILTER", words, 6); expectColumnName(vcff, "INFO", words, 7); if (wordCount > VCF_MIN_COLUMNS) { expectColumnName(vcff, "FORMAT", words, 8);