From f7047c4026c29e937af75f9f52fe70a52a0350c7 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Mon, 7 Feb 2022 11:42:09 -0800 Subject: [PATCH] samples: logging/syst: update sample for combined strings Compilers often combine strings to conserve space, if one string is a perfect substring of another one towards the end. So add another string in the test to make sure sys-t with catalog messages is still working correctly under this scenario. Signed-off-by: Daniel Leung --- samples/subsys/logging/syst/src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/subsys/logging/syst/src/main.c b/samples/subsys/logging/syst/src/main.c index c0ae6a4ac61..5c195512976 100644 --- a/samples/subsys/logging/syst/src/main.c +++ b/samples/subsys/logging/syst/src/main.c @@ -46,6 +46,7 @@ void log_msgs(void) char c = '!'; char *s = "static str"; + char *s1 = "c str"; char vs0[32]; char vs1[32]; @@ -67,7 +68,7 @@ void log_msgs(void) snprintk(&vs1[0], sizeof(vs1), "%s", "another dynamic str"); LOG_DBG("char %c", c); - LOG_DBG("s str %s", s); + LOG_DBG("s str %s %s", s, s1); #ifdef CONFIG_LOG1 LOG_DBG("d str %s", log_strdup(vs0));