src/hg/lib/customFactory.c 1.104

1.104 2009/09/23 18:42:20 angie
Fixed compiler warnings from gcc 4.3.3, mostly about system calls whose return values weren't checked and non-literal format strings with no args.
Index: src/hg/lib/customFactory.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/customFactory.c,v
retrieving revision 1.103
retrieving revision 1.104
diff -b -B -U 4 -r1.103 -r1.104
--- src/hg/lib/customFactory.c	15 Sep 2009 22:02:00 -0000	1.103
+++ src/hg/lib/customFactory.c	23 Sep 2009 18:42:20 -0000	1.104
@@ -1707,9 +1707,9 @@
 	    }
 	}
     errCatchEnd(errCatch);
     if (errCatch->gotError)
-	warn(errCatch->message->string);
+	warn("%s", errCatch->message->string);
     errCatchFree(&errCatch);
     }
 
 tdb->url = hashFindVal(hash, "url");
@@ -2160,9 +2160,9 @@
 /* Read a few bytes from fileName, so its access time is updated. */
 {
 char buf[256];
 FILE *f = mustOpen(fileName, "r");
-fgets(buf, sizeof(buf), f);
+mustGetLine(f, buf, sizeof(buf));
 fclose(f);
 }
 
 static boolean testFileSettings(struct trackDb *tdb, char *ctFileName)