diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 90314af48f6ac5f4be57276ef622f14f2705c567..d343a9e77cbf595f3b10563d1acf28be49a9639b 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -158,7 +158,7 @@ void UnityMalloc_MakeMallocFailAfterCount(int countdown) #ifdef UNITY_EXCLUDE_STDLIB_MALLOC static unsigned char unity_heap[UNITY_INTERNAL_HEAP_SIZE_BYTES]; -static unsigned int heap_index; +static size_t heap_index; #else #include #endif diff --git a/extras/fixture/test/unity_output_Spy.c b/extras/fixture/test/unity_output_Spy.c index 97c952348c6bd1bebe22324f62b5ec7e0c47730c..86d5a1c420e5eff1e9f996f7e5c2750db814abc6 100644 --- a/extras/fixture/test/unity_output_Spy.c +++ b/extras/fixture/test/unity_output_Spy.c @@ -24,7 +24,7 @@ void UnityOutputCharSpy_Create(int s) spy_enable = 0; buffer = malloc((size_t)size); TEST_ASSERT_NOT_NULL_MESSAGE(buffer, "Internal malloc failed in Spy Create():" __FILE__); - memset(buffer, 0, size); + memset(buffer, 0, (size_t)size); } void UnityOutputCharSpy_Destroy(void) diff --git a/src/unity.c b/src/unity.c index c0593ce545c4aee61d428e7a99a78d4f78a88a9b..23eaefea71b3f5704fa67e9b174a5f86ef5e6742 100644 --- a/src/unity.c +++ b/src/unity.c @@ -733,7 +733,7 @@ void UnityAssertFloatSpecial(const _UF actual, const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet }; _U_SINT should_be_trait = ((_U_SINT)style & 1); _U_SINT is_trait = !should_be_trait; - _U_SINT trait_index = style >> 1; + _U_SINT trait_index = (_U_SINT)(style >> 1); UNITY_SKIP_EXECUTION;