208943a63d7d5620b78217bb5593e9a17335d858
galt
  Mon Feb 6 17:59:56 2023 -0800
Problems found with newer gcc on Ubunto 20, compiled on a vm.

diff --git src/lib/bigBed.c src/lib/bigBed.c
index 17b7b2e..134e2ef 100644
--- src/lib/bigBed.c
+++ src/lib/bigBed.c
@@ -292,44 +292,45 @@
     {
     char *name = names[nameIx];
     struct slRef *oneList = bptFileFindMultiple(index, 
 	    name, strlen(name), sizeof(struct offsetSize));
     blockList = slCat(oneList, blockList);
     }
 
 /* Create nonredundant list of blocks. */
 struct fileOffsetSize *fosList = fosFromRedundantBlockList(&blockList, bbi->isSwapped);
 
 /* Clean up and resturn result. */
 slRefFreeListAndVals(&blockList);
 return fosList;
 }
 
-typedef boolean (*BbFirstWordMatch)(char *line, int fieldIx, void *target);
+typedef boolean (*BbFirstWordMatch)(char *origLine, int fieldIx, void *target);
 /* A function that returns TRUE if first word in tab-separated line matches target. */
 
-static void extractField(char *line, int fieldIx, char **retField, int *retFieldSize)
+static void extractField(char *origLine, int fieldIx, char **retField, int *retFieldSize)
 /* Go through tab separated line and figure out start and size of given field. */
 {
 int i;
 fieldIx -= 3;	/* Skip over chrom/start/end, which are not in line. */
+char *line = origLine;
 for (i=0; i<fieldIx; ++i)
     {
     line = strchr(line, '\t');
     if (line == NULL)
         {
-	warn("Not enough fields in extractField of %s", line);
+	warn("Not enough fields in extractField of %s", origLine);
 	internalErr();
 	}
     line += 1;
     }
 char *end = strchr(line, '\t');
 if (end == NULL)
     end = line + strlen(line);
 *retField = line;
 *retFieldSize = end - line;
 }
 
 static boolean bbWordMatchesName(char *line, int fieldIx, void *target)
 /* Return true if first word of line is same as target, which is just a string. */
 {
 char *name = target;