From 1c95f2350ada9a6d792b95aa2f52d514478a97d8 Mon Sep 17 00:00:00 2001 From: Victor Ronchetti Date: Mon, 30 Oct 2017 16:29:37 -0400 Subject: [PATCH 1/3] Clang Static Analyzer - "uninitialized argument value" warning fix --- tests/CppUTest/TestMemoryAllocatorTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CppUTest/TestMemoryAllocatorTest.cpp b/tests/CppUTest/TestMemoryAllocatorTest.cpp index 7c6017f36..85819acf8 100644 --- a/tests/CppUTest/TestMemoryAllocatorTest.cpp +++ b/tests/CppUTest/TestMemoryAllocatorTest.cpp @@ -216,7 +216,7 @@ TEST(FailableMemoryAllocator, FailFirstAllocationAtGivenLine) TEST(FailableMemoryAllocator, FailThirdAllocationAtGivenLine) { - int *memory[10]; + int *memory[10] = { NULL }; int allocation; failableMallocAllocator.failNthAllocAt(3, __FILE__, __LINE__ + 4); From ddd3ace357f56d4d5498b46881db621ab4a12aa9 Mon Sep 17 00:00:00 2001 From: PaulBussmann Date: Sun, 3 Dec 2017 13:00:29 +0100 Subject: [PATCH 2/3] Ignore generated build files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 3ff7f0ad1..e9860ca99 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,10 @@ builds/*gcc* CppUTestExtTests CppUTestTests /Makefile +build/Makefile +build/generated +build/src +build/tests config.h config.h.in config.status From d84c617de217ffef9945cfa81e31e759de94d133 Mon Sep 17 00:00:00 2001 From: PaulBussmann Date: Sun, 3 Dec 2017 13:02:53 +0100 Subject: [PATCH 3/3] Fix build CppUTest with GCC instruction (missing ./autogen.sh) --- README_InstallCppUTest.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README_InstallCppUTest.txt b/README_InstallCppUTest.txt index ebe0f9efa..8d91399c1 100644 --- a/README_InstallCppUTest.txt +++ b/README_InstallCppUTest.txt @@ -8,7 +8,9 @@ 2. Build CppUTest and examples 2a. For unix/gcc (including cygwin) - > cd /CppUTest/cpputest_build + > cd /CppUTest + > ./autogen.sh + > cd build > ../configure > make > make tdd # This is to run the CppUTest unit tests