diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-02-15 03:20:32 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-02-15 03:20:32 +0000 |
commit | 8eada627d56f8288137bebb490b9cc705afcbbf5 (patch) | |
tree | d1e483834ff107ab7811112450b0c06b41ce43b0 /lib | |
parent | b8863a16ad1e92aea849f3fc55467cd08bc52bfc (diff) | |
download | external_llvm-8eada627d56f8288137bebb490b9cc705afcbbf5.zip external_llvm-8eada627d56f8288137bebb490b9cc705afcbbf5.tar.gz external_llvm-8eada627d56f8288137bebb490b9cc705afcbbf5.tar.bz2 |
Fix warning on gcc 4.3.
"system() declared with attribute warn_unused_result."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64574 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/System/Unix/Path.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/System/Unix/Path.inc b/lib/System/Unix/Path.inc index 8efa2e0..a8dcedb 100644 --- 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; } |