This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, master has been updated via f3b7652efcdd9a2e248ed2ec83ce7fc10944f194 (commit) via 9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe (commit) via 613323a78bf33e22f510e41c8733fe2bc8df606a (commit) via bf2503089b19d1462be7838ed7364361481587d4 (commit) via ee555c2a33258a7b272f049aca369edf4d86fa7c (commit) from c07fa6d98c3ca2bc645c23c4a437d48d57d3eb8d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3b7652efcdd9a2e248ed2ec83ce7fc10944f194 commit f3b7652efcdd9a2e248ed2ec83ce7fc10944f194 Merge: c07fa6d 9e4b6bc Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Tue Jan 15 15:06:50 2019 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Tue Jan 15 10:07:02 2019 -0500 Merge topic 'clang-scan-build-warnings' 9e4b6bcbe8 Source/LexerParser: Suppress "Use of zero-allocated memory" warning 613323a78b cmGlobalUnixMakefileGenerator3: Fix memory leak warning bf2503089b liblzma: fix undefined shift result ee555c2a33 libuv: fix clang scan-build warning Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !2796 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe commit 9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Fri Jan 11 18:30:13 2019 -0500 Commit: Kyle Edwards <kyle.edwa...@kitware.com> CommitDate: Mon Jan 14 10:31:38 2019 -0500 Source/LexerParser: Suppress "Use of zero-allocated memory" warning clang scan-build warns about YY_CURRENT_BUFFER_LVALUE being zero- allocated, but the whole point of the macro is to know that it's not zero. Wrap the entire file in an "#ifndef __clang_analyzer__" block in order to suppress the warning. diff --git a/Source/LexerParser/cmCommandArgumentLexer.cxx b/Source/LexerParser/cmCommandArgumentLexer.cxx index 6b4fc85..c96f8b3 100644 --- a/Source/LexerParser/cmCommandArgumentLexer.cxx +++ b/Source/LexerParser/cmCommandArgumentLexer.cxx @@ -664,6 +664,8 @@ Modify cmCommandArgumentLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #include "cmCommandArgumentParserHelper.h" /* Replace the lexer input function. */ @@ -2246,3 +2248,5 @@ void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) BEGIN(ESCAPES); } } + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmCommandArgumentLexer.in.l b/Source/LexerParser/cmCommandArgumentLexer.in.l index 5927b9e..79275dd 100644 --- a/Source/LexerParser/cmCommandArgumentLexer.in.l +++ b/Source/LexerParser/cmCommandArgumentLexer.in.l @@ -18,6 +18,8 @@ Modify cmCommandArgumentLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #include "cmCommandArgumentParserHelper.h" /* Replace the lexer input function. */ @@ -145,3 +147,5 @@ void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) BEGIN(ESCAPES); } } + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmDependsJavaLexer.cxx b/Source/LexerParser/cmDependsJavaLexer.cxx index 36cac61..ed6eea9 100644 --- a/Source/LexerParser/cmDependsJavaLexer.cxx +++ b/Source/LexerParser/cmDependsJavaLexer.cxx @@ -860,6 +860,8 @@ Modify cmDependsJavaLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #include <iostream> #include "cmDependsJavaParserHelper.h" @@ -2811,3 +2813,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) } #define YYTABLES_NAME "yytables" + +/*--------------------------------------------------------------------------*/ + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmDependsJavaLexer.in.l b/Source/LexerParser/cmDependsJavaLexer.in.l index 01a0fa3..b48d1bd 100644 --- a/Source/LexerParser/cmDependsJavaLexer.in.l +++ b/Source/LexerParser/cmDependsJavaLexer.in.l @@ -18,6 +18,8 @@ Modify cmDependsJavaLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #include <iostream> #include "cmDependsJavaParserHelper.h" @@ -173,3 +175,7 @@ null { PRIMITIVE; return jp_NULLLITERAL; } } %% + +/*--------------------------------------------------------------------------*/ + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmExprLexer.cxx b/Source/LexerParser/cmExprLexer.cxx index cb24687..fd0f745 100644 --- a/Source/LexerParser/cmExprLexer.cxx +++ b/Source/LexerParser/cmExprLexer.cxx @@ -664,6 +664,8 @@ Modify cmExprLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #include "cmExprParserHelper.h" /* Replace the lexer input function. */ @@ -2223,3 +2225,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) } #define YYTABLES_NAME "yytables" + +/*--------------------------------------------------------------------------*/ + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmExprLexer.in.l b/Source/LexerParser/cmExprLexer.in.l index 2197c2a..89d1381 100644 --- a/Source/LexerParser/cmExprLexer.in.l +++ b/Source/LexerParser/cmExprLexer.in.l @@ -18,6 +18,8 @@ Modify cmExprLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #include "cmExprParserHelper.h" /* Replace the lexer input function. */ @@ -61,3 +63,7 @@ Modify cmExprLexer.cxx: . { yyextra->UnexpectedChar(yytext[0]); } %% + +/*--------------------------------------------------------------------------*/ + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmFortranLexer.cxx b/Source/LexerParser/cmFortranLexer.cxx index 82048df..f12df29 100644 --- a/Source/LexerParser/cmFortranLexer.cxx +++ b/Source/LexerParser/cmFortranLexer.cxx @@ -838,6 +838,8 @@ Modify cmFortranLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #undef YY_NO_UNPUT #define cmFortranLexer_cxx @@ -2610,3 +2612,5 @@ YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return YY_CURRENT_BUFFER; } + +#endif /* __clang_analyzer__ */ diff --git a/Source/LexerParser/cmFortranLexer.in.l b/Source/LexerParser/cmFortranLexer.in.l index b7e837b..f752f37 100644 --- a/Source/LexerParser/cmFortranLexer.in.l +++ b/Source/LexerParser/cmFortranLexer.in.l @@ -27,6 +27,8 @@ Modify cmFortranLexer.cxx: /* IWYU pragma: no_forward_declare yyguts_t */ +#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */ + #undef YY_NO_UNPUT #define cmFortranLexer_cxx @@ -183,3 +185,5 @@ YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return YY_CURRENT_BUFFER; } + +#endif /* __clang_analyzer__ */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=613323a78bf33e22f510e41c8733fe2bc8df606a commit 613323a78bf33e22f510e41c8733fe2bc8df606a Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Fri Jan 11 16:31:52 2019 -0500 Commit: Kyle Edwards <kyle.edwa...@kitware.com> CommitDate: Mon Jan 14 09:53:12 2019 -0500 cmGlobalUnixMakefileGenerator3: Fix memory leak warning this->Makefiles.empty() is called twice, leading clang scan-build to falsely believe that the delete statement was causing a memory leak. Fix this by using a unique_ptr to hold the temporary cmMakefile. This also has the benefit of making the code exception-safe. diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index db72353..ceee500 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -7,6 +7,7 @@ #include <sstream> #include <utility> +#include "cmAlgorithms.h" #include "cmDocumentationEntry.h" #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" @@ -494,6 +495,7 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( const std::string& targetName, const std::string& /*config*/, bool fast, int jobs, bool /*verbose*/, std::vector<std::string> const& makeOptions) { + std::unique_ptr<cmMakefile> mfu; cmMakefile* mf; if (!this->Makefiles.empty()) { mf = this->Makefiles[0]; @@ -504,7 +506,8 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( snapshot.GetDirectory().SetCurrentBinary( this->CMakeInstance->GetHomeOutputDirectory()); snapshot.SetDefaultDefinitions(); - mf = new cmMakefile(this, snapshot); + mfu = cm::make_unique<cmMakefile>(this, snapshot); + mf = mfu.get(); } makeCommand.push_back(this->SelectMakeProgram(makeProgram)); @@ -529,9 +532,6 @@ void cmGlobalUnixMakefileGenerator3::GenerateBuildCommand( cmSystemTools::ConvertToOutputSlashes(tname); makeCommand.push_back(std::move(tname)); } - if (this->Makefiles.empty()) { - delete mf; - } } void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf2503089b19d1462be7838ed7364361481587d4 commit bf2503089b19d1462be7838ed7364361481587d4 Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Fri Jan 11 16:22:37 2019 -0500 Commit: Kyle Edwards <kyle.edwa...@kitware.com> CommitDate: Mon Jan 14 09:53:12 2019 -0500 liblzma: fix undefined shift result When a 32-bit integer is shifted left by 32 bits, the result is undefined. Shift a 64-bit integer instead. diff --git a/Utilities/cmliblzma/liblzma/simple/x86.c b/Utilities/cmliblzma/liblzma/simple/x86.c index 23d0c42..b38cebf 100644 --- a/Utilities/cmliblzma/liblzma/simple/x86.c +++ b/Utilities/cmliblzma/liblzma/simple/x86.c @@ -97,7 +97,7 @@ x86_code(void *simple_ptr, uint32_t now_pos, bool is_encoder, if (!Test86MSByte(b)) break; - src = dest ^ ((1u << (32 - i * 8)) - 1); + src = dest ^ ((1ull << (32 - i * 8)) - 1); } buffer[buffer_pos + 4] https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee555c2a33258a7b272f049aca369edf4d86fa7c commit ee555c2a33258a7b272f049aca369edf4d86fa7c Author: Kyle Edwards <kyle.edwa...@kitware.com> AuthorDate: Fri Jan 11 16:04:26 2019 -0500 Commit: Kyle Edwards <kyle.edwa...@kitware.com> CommitDate: Mon Jan 14 09:53:12 2019 -0500 libuv: fix clang scan-build warning diff --git a/Utilities/cmlibuv/src/unix/process.c b/Utilities/cmlibuv/src/unix/process.c index 1bded8d..f2a5065 100644 --- a/Utilities/cmlibuv/src/unix/process.c +++ b/Utilities/cmlibuv/src/unix/process.c @@ -334,7 +334,7 @@ static void uv__process_child_init(const uv_process_options_t* options, use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR); close_fd = use_fd; - if (use_fd == -1) { + if (use_fd < 0) { uv__write_int(error_fd, UV__ERR(errno)); _exit(127); } ----------------------------------------------------------------------- Summary of changes: Source/LexerParser/cmCommandArgumentLexer.cxx | 4 ++++ Source/LexerParser/cmCommandArgumentLexer.in.l | 4 ++++ Source/LexerParser/cmDependsJavaLexer.cxx | 6 ++++++ Source/LexerParser/cmDependsJavaLexer.in.l | 6 ++++++ Source/LexerParser/cmExprLexer.cxx | 6 ++++++ Source/LexerParser/cmExprLexer.in.l | 6 ++++++ Source/LexerParser/cmFortranLexer.cxx | 4 ++++ Source/LexerParser/cmFortranLexer.in.l | 4 ++++ Source/cmGlobalUnixMakefileGenerator3.cxx | 8 ++++---- Utilities/cmliblzma/liblzma/simple/x86.c | 2 +- Utilities/cmlibuv/src/unix/process.c | 2 +- 11 files changed, 46 insertions(+), 6 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits