Fix some errors in pedantic mode for testing.h
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define MESSAGE(FILE, COLOUR, NAME, FORMAT, ...) \
|
#define MESSAGE(FILE, COLOUR, NAME, FORMAT, ...) \
|
||||||
@@ -38,7 +39,7 @@ struct Test
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define CREATE_TEST(NAME) \
|
#define CREATE_TEST(NAME) \
|
||||||
(struct Test) \
|
(const struct Test) \
|
||||||
{ \
|
{ \
|
||||||
.name = #NAME, .src = NAME \
|
.name = #NAME, .src = NAME \
|
||||||
}
|
}
|
||||||
@@ -73,7 +74,7 @@ static void byte_array_to_string(const byte_t *bytes, size_t size_bytes,
|
|||||||
size_t j = 1;
|
size_t j = 1;
|
||||||
for (size_t i = 0; i < size_bytes; ++i)
|
for (size_t i = 0; i < size_bytes; ++i)
|
||||||
{
|
{
|
||||||
char buffer[7];
|
char buffer[8];
|
||||||
int k = i == size_bytes - 1 ? 0 : 2;
|
int k = i == size_bytes - 1 ? 0 : 2;
|
||||||
size_t n = 4 + k;
|
size_t n = 4 + k;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user