Explorar el Código

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.
Brad King hace 11 años
padre
commit
1de086855c
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      Source/cmSystemTools.cxx

+ 3 - 0
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,