src/lib/obscure.c 1.48

1.48 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/obscure.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/obscure.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -b -B -U 4 -r1.47 -r1.48
--- src/lib/obscure.c	22 Jul 2009 17:36:22 -0000	1.47
+++ src/lib/obscure.c	23 Sep 2009 18:42:28 -0000	1.48
@@ -20,9 +20,9 @@
 long val = 0;
 FILE *f = fopen(fileName, "r+b");
 if (f != NULL)
     {
-    fread(&val, sizeof(val), 1, f);
+    mustReadOne(f, val);
     rewind(f);
     }
 else
     {
@@ -231,9 +231,9 @@
 for (;;)
     {
     readSize = read(s, buf, bufSize);
     if (readSize > 0)
-        write(d, buf, readSize);
+        mustWriteFd(d, buf, readSize);
     if (readSize <= 0)
         break;
     }
 freeMem(buf);