From 7e7a1c0a50e9ec589866ea4ebd2d27c1c8424d8f Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 12:59:27 -0400 Subject: [PATCH 1/8] curl: Fix typo in header include guard From clang's -Wheader-guard. --- Utilities/cmcurl/parsedate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/cmcurl/parsedate.h b/Utilities/cmcurl/parsedate.h index 0ea2d83c3..b29fe9bae 100644 --- a/Utilities/cmcurl/parsedate.h +++ b/Utilities/cmcurl/parsedate.h @@ -1,5 +1,5 @@ #ifndef __PARSEDATE_H -#define __PARSEDATEL_H +#define __PARSEDATE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | From 6cea3eeb4b785fa4b72d4a26c9b6df09180ae34c Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 13:00:07 -0400 Subject: [PATCH 2/8] cmNewLineStyle: Remove useless semi-colon Warned by clang. --- Source/cmNewLineStyle.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmNewLineStyle.cxx b/Source/cmNewLineStyle.cxx index 6f7b6a949..a7d74297f 100644 --- a/Source/cmNewLineStyle.cxx +++ b/Source/cmNewLineStyle.cxx @@ -78,7 +78,7 @@ const std::string cmNewLineStyle::GetCharacters() const return "\r\n"; default: ; - }; + } return ""; } From d99303220922142c2d3fdce5346d0997e4f3b457 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 13:00:58 -0400 Subject: [PATCH 3/8] cmGraphVizWriter: Add extra space in comment to suppress warning Clang's -Wdocumentation thought it was malformed doxygen. --- Source/cmGraphVizWriter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index 4816da9ea..3a7070e5d 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -534,8 +534,8 @@ int cmGraphVizWriter::CollectAllExternalLibs(int cnt) ostr << this->GraphNodePrefix << cnt++; this->TargetNamesNodes[libName] = ostr.str(); this->TargetPtrs[libName] = NULL; - //str << " \"" << ostr.c_str() << "\" [ label=\"" << libName - //<< "\" shape=\"ellipse\"];" << std::endl; + // str << " \"" << ostr.c_str() << "\" [ label=\"" << libName + // << "\" shape=\"ellipse\"];" << std::endl; } } } From 8e96353fd85cff5f06bda071f3a11397e3faa757 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 13:02:31 -0400 Subject: [PATCH 4/8] Fix warnings about \brief usage A doxygen \brief is ended with a newline, so remove a newline right after \brief to fix clang -Wdocumentation warning. --- Source/cmAddCustomCommandCommand.h | 4 +--- Source/cmCreateTestSourceList.h | 2 +- Source/cmIncludeCommand.h | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h index 1cc1e3a75..2504185b0 100644 --- a/Source/cmAddCustomCommandCommand.h +++ b/Source/cmAddCustomCommandCommand.h @@ -16,9 +16,7 @@ #include "cmDocumentGeneratorExpressions.h" /** \class cmAddCustomCommandCommand - * \brief - * - * cmAddCustomCommandCommand defines a new command (rule) that can + * \brief cmAddCustomCommandCommand defines a new command (rule) that can * be executed within the build process * */ diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h index 3aa0a79cf..b9c634113 100644 --- a/Source/cmCreateTestSourceList.h +++ b/Source/cmCreateTestSourceList.h @@ -15,7 +15,7 @@ #include "cmCommand.h" /** \class cmCreateTestSourceList - * \brief + * \brief Test driver generation command * */ diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h index d97b7c3f5..8ff8b20f3 100644 --- a/Source/cmIncludeCommand.h +++ b/Source/cmIncludeCommand.h @@ -15,9 +15,7 @@ #include "cmCommand.h" /** \class cmIncludeCommand - * \brief - * - * cmIncludeCommand defines a list of distant + * \brief cmIncludeCommand defines a list of distant * files that can be "included" in the current list file. * In almost every sense, this is identical to a C/C++ * #include command. Arguments are first expended as usual. From 97124f91a5eaa5b1bf962813e72b1b2406960a76 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 13:03:38 -0400 Subject: [PATCH 5/8] cmTarget: Properly escape @ char in doxygen comments Found by clang's -Wdocumentation. --- Source/cmTarget.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 27b74ca4b..527cbc797 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -372,7 +372,7 @@ public: /** Get the soname of the target. Allowed only for a shared library. */ std::string GetSOName(const char* config); - /** Whether this library has @rpath and platform supports it. */ + /** Whether this library has \@rpath and platform supports it. */ bool HasMacOSXRpath(const char* config); /** Test for special case of a third-party shared library that has @@ -421,12 +421,12 @@ public: bool IsChrpathUsed(const char* config); /** Return the install name directory for the target in the - * build tree. For example: "@rpath/", "@loader_path/", + * build tree. For example: "\@rpath/", "\@loader_path/", * or "/full/path/to/library". */ std::string GetInstallNameDirForBuildTree(const char* config); /** Return the install name directory for the target in the - * install tree. For example: "@rpath/" or "@loader_path/". */ + * install tree. For example: "\@rpath/" or "\@loader_path/". */ std::string GetInstallNameDirForInstallTree(); cmComputeLinkInformation* GetLinkInformation(const char* config, From d915819ad1a6c0dafb38dc12c1e1329d8130403f Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 13:05:17 -0400 Subject: [PATCH 6/8] cm*Lexer: Populate empty doxygen @param comment And in one case fixed wrong param name. Warned by clang -Wdocumentation. --- Source/cmCommandArgumentLexer.cxx | 4 ++-- Source/cmDependsFortranLexer.cxx | 4 ++-- Source/cmDependsJavaLexer.cxx | 4 ++-- Source/cmExprLexer.cxx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx index e68f6b5fd..e62e53e2e 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/cmCommandArgumentLexer.cxx @@ -1820,7 +1820,7 @@ void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yysca } /** Set the current line number. - * @param line_number + * @param line_number The line number to set. * @param yyscanner The scanner object. */ void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner) @@ -1835,7 +1835,7 @@ void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param column_no + * @param column_no The column number to set. * @param yyscanner The scanner object. */ void cmCommandArgument_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx index 924d9d2a9..1eff1e4b4 100644 --- a/Source/cmDependsFortranLexer.cxx +++ b/Source/cmDependsFortranLexer.cxx @@ -2165,7 +2165,7 @@ void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscan } /** Set the current line number. - * @param line_number + * @param line_number The line number to set. * @param yyscanner The scanner object. */ void cmDependsFortran_yyset_lineno (int line_number , yyscan_t yyscanner) @@ -2180,7 +2180,7 @@ void cmDependsFortran_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param line_number + * @param column_no The column number to set. * @param yyscanner The scanner object. */ void cmDependsFortran_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index 0af44b02e..1e505a557 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -2330,7 +2330,7 @@ void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner } /** Set the current line number. - * @param line_number + * @param line_number The line number to set. * @param yyscanner The scanner object. */ void cmDependsJava_yyset_lineno (int line_number , yyscan_t yyscanner) @@ -2345,7 +2345,7 @@ void cmDependsJava_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param column_no + * @param column_no The column number to set. * @param yyscanner The scanner object. */ void cmDependsJava_yyset_column (int column_no , yyscan_t yyscanner) diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index 9947c77f1..aa384cdc8 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -1716,7 +1716,7 @@ void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) } /** Set the current line number. - * @param line_number + * @param line_number The line number to set. * @param yyscanner The scanner object. */ void cmExpr_yyset_lineno (int line_number , yyscan_t yyscanner) @@ -1731,7 +1731,7 @@ void cmExpr_yyset_lineno (int line_number , yyscan_t yyscanner) } /** Set the current column. - * @param column_no + * @param column_no The column number to set. * @param yyscanner The scanner object. */ void cmExpr_yyset_column (int column_no , yyscan_t yyscanner) From cb4ec606a9e13ed4064fd8f72f00e51ec09ea537 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 13:08:38 -0400 Subject: [PATCH 7/8] cmDocumentation: Fix a few doxygen comment errors Warned by clang -Wdocumentation --- Source/cmDocumentation.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h index e180f60f5..218f44d57 100644 --- a/Source/cmDocumentation.h +++ b/Source/cmDocumentation.h @@ -154,11 +154,11 @@ public: /** * Retrieve the list of documented module located in * path which match the globing expression globExpr. - * @param[in] path, directory where to start the search + * @param[in] path directory where to start the search * we will recurse into it. - * @param[in] globExpr, the globing expression used to + * @param[in] globExpr the globing expression used to * match the file in path. - * @param[out] the list of obtained pairs (may be empty) + * @param[out] docModuleList the list of obtained pairs (may be empty) * @return 0 on success 1 on error or empty list */ int getDocumentedModulesListInDir( @@ -180,10 +180,9 @@ public: * @param[in] fname the script file name to be parsed for documentation * @param[in,out] commands the vector of command/macros documentation * entry found in the script file. - * @param[in,out] the cmake object instance to which variable documentation - * will be attached (using @see cmake::DefineProperty) - * @param[in] the documentation section in which the property will be - * inserted. + * @param[in,out] cm the cmake object instance to which variable + * documentation will be attached + * (using @see cmake::DefineProperty) * @return the number of documented items (command and variable) * found in the file. */ From af0051f48ac54ff749faff885f05fb9f34037d5a Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 19 Sep 2013 15:07:51 -0400 Subject: [PATCH 8/8] curl, bzip2: Suppress warnings by setting initial value Silence clang -Wsometimes-uninitialized warnings. --- Utilities/cmbzip2/compress.c | 2 +- Utilities/cmcurl/multi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/cmbzip2/compress.c b/Utilities/cmbzip2/compress.c index 7d9b3da75..feea233c2 100644 --- a/Utilities/cmbzip2/compress.c +++ b/Utilities/cmbzip2/compress.c @@ -239,7 +239,7 @@ static void sendMTFValues ( EState* s ) { Int32 v, t, i, j, gs, ge, totc, bt, bc, iter; - Int32 nSelectors, alphaSize, minLen, maxLen, selCtr; + Int32 nSelectors = 0, alphaSize, minLen, maxLen, selCtr; Int32 nGroups, nBytes; /*-- diff --git a/Utilities/cmcurl/multi.c b/Utilities/cmcurl/multi.c index b501f296f..869d56801 100644 --- a/Utilities/cmcurl/multi.c +++ b/Utilities/cmcurl/multi.c @@ -763,7 +763,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, struct Curl_message *msg = NULL; bool connected; bool async; - bool protocol_connect; + bool protocol_connect = 0; bool dophase_done; bool done; CURLMcode result = CURLM_OK;