From 1de086855caa63063380387d70811e8acf1f3d05 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 2 Apr 2014 09:35:36 -0400 Subject: [PATCH] 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. --- Source/cmSystemTools.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 2f5f493eb..21e387466 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,