changeset 1564:a3da9370c03f

Use 'unsigned char *' instead of string define This way, sizeof() does the intended thing instead of returning the size of a pointer on the platform. Coverity CID 349411
author Thomas Klausner <wiz@gatalith.at>
date Tue, 22 Jun 2021 21:18:43 +0200
parents e9ba8c538734
children 4971c8c8879e
files tests/testostr.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/testostr.c	Tue Jun 22 21:07:13 2021 +0200
+++ b/tests/testostr.c	Tue Jun 22 21:18:43 2021 +0200
@@ -35,7 +35,7 @@
 
 #include "tests.h"
 
-#define TEST_STR (os0_t)"This is my test string (with extra unused data)"
+unsigned char TEST_STR[] = "This is my test string (with extra unused data)";
 
 /* The following string contains UTF-8 encoded characters (Chinese characters) */
 #define TEST_IDN_UTF8  "freeDiameter.中国"
"Welcome to our mercurial repository"