[llvm-commits] [llvm] r64574 - /llvm/trunk/lib/System/Unix/Path.inc
Mikhail Glushenkov
foldr at codedgers.com
Sat Feb 14 19:20:32 PST 2009
Author: foldr
Date: Sat Feb 14 21:20:32 2009
New Revision: 64574
URL: http://llvm.org/viewvc/llvm-project?rev=64574&view=rev
Log:
Fix warning on gcc 4.3.
"system() declared with attribute warn_unused_result."
Modified:
llvm/trunk/lib/System/Unix/Path.inc
Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=64574&r1=64573&r2=64574&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Sat Feb 14 21:20:32 2009
@@ -658,7 +658,10 @@
if (remove_contents) {
// Recursively descend the directory to remove its contents.
std::string cmd = "/bin/rm -rf " + path;
- system(cmd.c_str());
+ if (system(cmd.c_str()) != 0) {
+ MakeErrMsg(ErrStr, path + ": failed to recursively remove directory.");
+ return true;
+ }
return false;
}
More information about the llvm-commits
mailing list