summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-02 13:35:36 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-02 13:35:36 (GMT)
commit1de086855caa63063380387d70811e8acf1f3d05 (patch)
tree2f8ba472582e62dd1f8917031627fd4ff0de98dd /Source/cmSystemTools.cxx
parent8c9c4fe1a6d0c660c7e4e4c1af2cdf2e889fbfbd (diff)
downloadCMake-1de086855caa63063380387d70811e8acf1f3d05.zip
CMake-1de086855caa63063380387d70811e8acf1f3d05.tar.gz
CMake-1de086855caa63063380387d70811e8acf1f3d05.tar.bz2
cmSystemTools: Restore unreachable return to silence warnings
Some compilers do not recognize that the end of copy_data cannot be reached and complain that there is no return statement. Clang warns that there is an unreachable return statement if it appears. Conditionally add the return statement when not building with Clang.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 2f5f493..21e3874 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1662,6 +1662,9 @@ long copy_data(struct archive *ar, struct archive *aw)
return (r);
}
}
+#if !defined(__clang__)
+ return r; /* this should not happen but it silences a warning */
+#endif
}
bool extract_tar(const char* outFileName, bool verbose,