mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-06-25 10:13:12 +08:00
Fix additional primitive type conversion warnings on Linux
Using gcc 4.8 on Ubuntu 14
This commit is contained in:
@ -158,7 +158,7 @@ void UnityMalloc_MakeMallocFailAfterCount(int countdown)
|
|||||||
|
|
||||||
#ifdef UNITY_EXCLUDE_STDLIB_MALLOC
|
#ifdef UNITY_EXCLUDE_STDLIB_MALLOC
|
||||||
static unsigned char unity_heap[UNITY_INTERNAL_HEAP_SIZE_BYTES];
|
static unsigned char unity_heap[UNITY_INTERNAL_HEAP_SIZE_BYTES];
|
||||||
static unsigned int heap_index;
|
static size_t heap_index;
|
||||||
#else
|
#else
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,7 +24,7 @@ void UnityOutputCharSpy_Create(int s)
|
|||||||
spy_enable = 0;
|
spy_enable = 0;
|
||||||
buffer = malloc((size_t)size);
|
buffer = malloc((size_t)size);
|
||||||
TEST_ASSERT_NOT_NULL_MESSAGE(buffer, "Internal malloc failed in Spy Create():" __FILE__);
|
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)
|
void UnityOutputCharSpy_Destroy(void)
|
||||||
|
@ -733,7 +733,7 @@ void UnityAssertFloatSpecial(const _UF actual,
|
|||||||
const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet };
|
const char* trait_names[] = { UnityStrInf, UnityStrNegInf, UnityStrNaN, UnityStrDet };
|
||||||
_U_SINT should_be_trait = ((_U_SINT)style & 1);
|
_U_SINT should_be_trait = ((_U_SINT)style & 1);
|
||||||
_U_SINT is_trait = !should_be_trait;
|
_U_SINT is_trait = !should_be_trait;
|
||||||
_U_SINT trait_index = style >> 1;
|
_U_SINT trait_index = (_U_SINT)(style >> 1);
|
||||||
|
|
||||||
UNITY_SKIP_EXECUTION;
|
UNITY_SKIP_EXECUTION;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user