From de28c78e2a60086afe8246e9d7bd79f1c966782f Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Mon, 25 Nov 2024 11:08:59 -0800 Subject: [PATCH] shell: Use proper flexible array 0 length array is a GNU extension. Use proper C99 flexible array. Signed-off-by: Flavio Ceolin --- subsys/shell/shell_history.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/shell/shell_history.c b/subsys/shell/shell_history.c index 9e747e9c5054fac..2eccee7951a4081 100644 --- a/subsys/shell/shell_history.c +++ b/subsys/shell/shell_history.c @@ -5,6 +5,7 @@ */ #include +#include #include /* @@ -42,7 +43,7 @@ struct shell_history_item { sys_dnode_t dnode; uint16_t len; uint16_t padding; - char data[0]; + FLEXIBLE_ARRAY_DECLARE(char, data); }; void z_shell_history_mode_exit(struct shell_history *history)