src/hg/encode/validateFiles/validateFiles.c 1.27
1.27 2009/09/23 18:42:16 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/encode/validateFiles/validateFiles.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/validateFiles/validateFiles.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -b -B -U 4 -r1.26 -r1.27
--- src/hg/encode/validateFiles/validateFiles.c 19 Aug 2009 17:58:00 -0000 1.26
+++ src/hg/encode/validateFiles/validateFiles.c 23 Sep 2009 18:42:16 -0000 1.27
@@ -520,12 +520,13 @@
// Othewise print warning and return FALSE
// taken from sqlNum.c
{
char* end;
-strtod(val, &end);
+double discardMe = strtod(val, &end);
if ((end == val) || (*end != '\0'))
{
warn("Error [file=%s, line=%d]: invalid %s '%s' [%s]", file, line, name, val, row);
+ discardMe = 0.0;
return FALSE;
}
return TRUE;
}
@@ -1064,9 +1065,9 @@
optionInit(&argc, argv, options);
++argv;
--argc;
if (optionExists("version"))
- errAbort(version);
+ errAbort("%s", version);
if (argc==0)
usage();
type = optionVal("type", "");
if (strlen(type) == 0)