mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-28 18:54:27 +01:00
Clean up conversion warnings in Fixture
Turn on -Wconversion in Makefile, fix all warnings
This commit is contained in:
@@ -46,7 +46,7 @@ clean:
|
||||
# These extended flags DO get included before any target build runs
|
||||
CFLAGS += -Wbad-function-cast
|
||||
CFLAGS += -Wcast-qual
|
||||
#CFLAGS += -Wconversion
|
||||
CFLAGS += -Wconversion
|
||||
CFLAGS += -Wformat=2
|
||||
CFLAGS += -Wmissing-prototypes
|
||||
CFLAGS += -Wold-style-definition
|
||||
|
||||
@@ -144,7 +144,7 @@ TEST(UnityFixture, FreeNULLSafety)
|
||||
TEST_GROUP(UnityCommandOptions);
|
||||
|
||||
int savedVerbose;
|
||||
int savedRepeat;
|
||||
unsigned int savedRepeat;
|
||||
const char* savedName;
|
||||
const char* savedGroup;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ void UnityOutputCharSpy_Create(int s)
|
||||
size = s;
|
||||
count = 0;
|
||||
spy_enable = 0;
|
||||
buffer = malloc(size);
|
||||
buffer = malloc((size_t)size);
|
||||
TEST_ASSERT_NOT_NULL_MESSAGE(buffer, "Internal malloc failed in Spy Create():" __FILE__);
|
||||
memset(buffer, 0, size);
|
||||
}
|
||||
@@ -38,7 +38,7 @@ int UnityOutputCharSpy_OutputChar(int c)
|
||||
if (spy_enable)
|
||||
{
|
||||
if (count < (size-1))
|
||||
buffer[count++] = c;
|
||||
buffer[count++] = (char)c;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user