summaryrefslogtreecommitdiff
blob: b43f20c0686046fdfffbaf2f8c450e92b5e4a8ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- a/test/src/utils/stringUtils/tc_strelim.c
+++ b/test/src/utils/stringUtils/tc_strelim.c
@@ -7,7 +7,7 @@
 
 START_TEST(test_noFound) {
   const char* const str = "abcdeffedcba";
-  char              s[strlen(str)];
+  char              s[strlen(str) + 1];
   strcpy(s, str);
   ck_assert_str_eq(strelim(s, 'x'), str);
 }
--- a/test/src/utils/stringUtils/tc_strelimIfAfter.c
+++ b/test/src/utils/stringUtils/tc_strelimIfAfter.c
@@ -7,7 +7,7 @@
 
 START_TEST(test_noElim) {
   const char* const str = "abcdeffedcba";
-  char              s[strlen(str)];
+  char              s[strlen(str) + 1];
   strcpy(s, str);
   ck_assert_str_eq(strelimIfAfter(s, 'b', 'x'), str);
 }
@@ -15,7 +15,7 @@
 
 START_TEST(test_noFound) {
   const char* const str = "abcdeffedcba";
-  char              s[strlen(str)];
+  char              s[strlen(str) + 1];
   strcpy(s, str);
   ck_assert_str_eq(strelimIfAfter(s, 'x', 'a'), str);
 }
--- a/test/src/utils/stringUtils/tc_strelimIfFollowed.c
+++ b/test/src/utils/stringUtils/tc_strelimIfFollowed.c
@@ -7,7 +7,7 @@
 
 START_TEST(test_noElim) {
   const char* const str = "abcdeffedcba";
-  char              s[strlen(str)];
+  char              s[strlen(str) + 1];
   strcpy(s, str);
   ck_assert_str_eq(strelimIfFollowed(s, 'b', 'x'), str);
 }
@@ -15,7 +15,7 @@
 
 START_TEST(test_noFound) {
   const char* const str = "abcdeffedcba";
-  char              s[strlen(str)];
+  char              s[strlen(str) + 1];
   strcpy(s, str);
   ck_assert_str_eq(strelimIfFollowed(s, 'x', 'a'), str);
 }