projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8863a1
)
Fix warning on gcc 4.3.
author
Mikhail Glushenkov
<foldr@codedgers.com>
Sun, 15 Feb 2009 03:20:32 +0000
(
03:20
+0000)
committer
Mikhail Glushenkov
<foldr@codedgers.com>
Sun, 15 Feb 2009 03:20:32 +0000
(
03:20
+0000)
"system() declared with attribute warn_unused_result."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64574
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Unix/Path.inc
patch
|
blob
|
history
diff --git
a/lib/System/Unix/Path.inc
b/lib/System/Unix/Path.inc
index 8efa2e085e1e93be614feb092cadbe05867bbabe..a8dcedb7417947e34e45df5290ca529a5b56eebf 100644
(file)
--- a/
lib/System/Unix/Path.inc
+++ b/
lib/System/Unix/Path.inc
@@
-658,7
+658,10
@@
Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const {
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;
}