1
0
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:
jsalling
2016-02-17 22:17:05 -06:00
parent ad14ccf26b
commit 7b0f3cf986
5 changed files with 9 additions and 9 deletions

View File

@@ -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

View File

@@ -144,7 +144,7 @@ TEST(UnityFixture, FreeNULLSafety)
TEST_GROUP(UnityCommandOptions);
int savedVerbose;
int savedRepeat;
unsigned int savedRepeat;
const char* savedName;
const char* savedGroup;

View File

@@ -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
{