From 002b21b649d1d8cf1556e3c73656394be62e2f15 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 18 Jun 2024 23:57:09 +0100 Subject: [PATCH] Fix some errors in pedantic mode for testing.h --- test/testing.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/testing.h b/test/testing.h index afd5b0a..6fe9100 100644 --- a/test/testing.h +++ b/test/testing.h @@ -18,6 +18,7 @@ #include #include +#include #include #define MESSAGE(FILE, COLOUR, NAME, FORMAT, ...) \ @@ -38,7 +39,7 @@ struct Test }; #define CREATE_TEST(NAME) \ - (struct Test) \ + (const struct Test) \ { \ .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; for (size_t i = 0; i < size_bytes; ++i) { - char buffer[7]; + char buffer[8]; int k = i == size_bytes - 1 ? 0 : 2; size_t n = 4 + k;