src/lib/wormdna.c 1.11
1.11 2009/09/23 18:42:29 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/wormdna.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/wormdna.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/lib/wormdna.c 10 Apr 2005 14:41:26 -0000 1.10
+++ src/lib/wormdna.c 23 Sep 2009 18:42:29 -0000 1.11
@@ -268,9 +268,9 @@
wormCdnaCache();
if (!snofFindOffset(cdnaSnof, name, &offset))
return FALSE;
fseek(cdnaFa, offset, SEEK_SET);
-fgets(commentBuf, sizeof(commentBuf), cdnaFa);
+mustGetLine(cdnaFa, commentBuf, sizeof(commentBuf));
if (commentBuf[0] != '>')
errAbort("Expecting line starting with > in cDNA fa file.\nGot %s", commentBuf);
comment = cloneString(commentBuf);
wormFaCommentIntoInfo(comment, retInfo);
@@ -970,9 +970,9 @@
if (sameString(baseName, bName))
{
int s, e;
fseek(f, offset, SEEK_SET);
- fgets(lineBuf, sizeof(lineBuf), f);
+ mustGetLine(f, lineBuf, sizeof(lineBuf));
wordCount = chopLine(lineBuf, words);
assert(wordCount == 3);
wormParseChromRange(words[0], retChrom, &s, &e);
*retStrand = words[1][0];
@@ -1041,9 +1041,9 @@
}
if (!snofFindOffset(c2cSnof, name, &offset) )
return FALSE;
fseek(c2cFile, offset, SEEK_SET);
- fgets(lineBuf, sizeof(lineBuf), c2cFile);
+ mustGetLine(c2cFile, lineBuf, sizeof(lineBuf));
wordCount = chopLine(lineBuf, words);
assert(wordCount == 3);
assert(strcmp(words[2], name) == 0);
assert(wormIsChromRange(words[0]));