src/utils/ccCp/ccCp.c 1.7
1.7 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/utils/ccCp/ccCp.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/ccCp/ccCp.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -B -U 4 -r1.6 -r1.7
--- src/utils/ccCp/ccCp.c 4 Mar 2005 19:54:46 -0000 1.6
+++ src/utils/ccCp/ccCp.c 23 Sep 2009 18:42:29 -0000 1.7
@@ -123,9 +123,10 @@
char dir[512];
if (firstChar == '/' || firstChar == '~')
return cloneString(relName);
-getcwd(dir, sizeof(dir));
+if (getcwd(dir, sizeof(dir)) == NULL)
+ errAbort("fullPathName: getcwd failed!");
sprintf(fullPath, "%s/%s", dir, relName);
return cloneString(fullPath);
}