src/lib/fa.c 1.38

1.38 2009/09/23 18:42:28 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/lib/fa.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/fa.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -b -B -U 4 -r1.37 -r1.38
--- src/lib/fa.c	20 Feb 2007 18:50:21 -0000	1.37
+++ src/lib/fa.c	23 Sep 2009 18:42:28 -0000	1.38
@@ -274,9 +274,10 @@
 if (maxSize < 0)
     errAbort("can't open %s", fileName);
 s = needHugeMem(maxSize+1);
 fd = open(fileName, O_RDONLY);
-read(fd, s, maxSize);
+if (read(fd, s, maxSize) < 0)
+    errAbort("faReadSeq: read failed: %s", strerror(errno));
 close(fd);
 s[maxSize] = 0;
 return faSeqFromMemText(s, isDna);
 }