From 0807e457532ac20694e64154802fc55c041d40d5 Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Tue, 8 Dec 2015 21:31:33 -0500 Subject: [PATCH] - Merge in latest Unity - Avoid getting casting errors of going from const char* to void* by going from char[] instead --- targets/clang_strict.yml | 3 +++ .../array_and_pointer_handling.yml | 13 +++++++------ .../system/test_interactions/parsing_challenges.yml | 2 +- vendor/unity | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/targets/clang_strict.yml b/targets/clang_strict.yml index 6dc6bc3..5286971 100644 --- a/targets/clang_strict.yml +++ b/targets/clang_strict.yml @@ -12,6 +12,8 @@ compiler: - '-Werror' - '-Wcast-qual' - '-Wconversion' + - '-Wtautological-compare' + #- '-Wtautological-pointer-compare' - '-Wdisabled-optimization' - '-Wformat=2' - '-Winit-self' @@ -36,6 +38,7 @@ compiler: - '-Wwrite-strings' - '-Wbad-function-cast' - '-Wno-missing-prototypes' #we've been lazy about things like setUp and tearDown + - '-Wno-invalid-token-paste' - '-fms-extensions' - '-fno-omit-frame-pointer' - '-ffloat-store' diff --git a/test/system/test_interactions/array_and_pointer_handling.yml b/test/system/test_interactions/array_and_pointer_handling.yml index 5d48761..ce89287 100644 --- a/test/system/test_interactions/array_and_pointer_handling.yml +++ b/test/system/test_interactions/array_and_pointer_handling.yml @@ -58,7 +58,8 @@ } void function_f(void) { - voidpointerfunc("hello"); + char arg[6] = "hello"; + voidpointerfunc(arg); } :tests: @@ -391,7 +392,7 @@ :code: | test() { - char* expect_list = "hello"; + char expect_list[6] = "hello"; voidpointerfunc_ExpectWithArray(expect_list, 5); function_f(); @@ -402,7 +403,7 @@ :code: | test() { - char* expect_list = "help!"; + char expect_list[6] = "help!"; voidpointerfunc_ExpectWithArray(expect_list, 3); function_f(); @@ -413,7 +414,7 @@ :code: | test() { - char* expect_list = "help!"; + char expect_list[6] = "help!"; voidpointerfunc_ExpectWithArray(expect_list, 4); function_f(); @@ -424,7 +425,7 @@ :code: | test() { - char* expect_list = "h"; + char expect_list[2] = "h"; voidpointerfunc_Expect(expect_list); function_f(); @@ -435,7 +436,7 @@ :code: | test() { - char* expect_list = "g"; + char expect_list[2] = "g"; voidpointerfunc_Expect(expect_list); function_f(); diff --git a/test/system/test_interactions/parsing_challenges.yml b/test/system/test_interactions/parsing_challenges.yml index f262b8a..84b3c4f 100644 --- a/test/system/test_interactions/parsing_challenges.yml +++ b/test/system/test_interactions/parsing_challenges.yml @@ -231,7 +231,7 @@ :code: | test() { - char* blah = "blah"; + char blah[5] = "blah"; void_type_craziness3_Expect(blah); exercise_type_craziness3(blah); } diff --git a/vendor/unity b/vendor/unity index b922d62..9aeaee2 160000 --- a/vendor/unity +++ b/vendor/unity @@ -1 +1 @@ -Subproject commit b922d622a6463a5ba5c745579c4428263e706bbf +Subproject commit 9aeaee26c91d78bccd2c471b1f2570220524b2bc