From 87f017d0792befa83722b99cb21f9c8f574cd71d Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Fri, 24 Jan 2025 14:51:54 +0100 Subject: s390/vmlogrdr: Use array instead of string initializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiling vmlogrdr with GCC 15 generates this warning: CC [M] drivers/s390/char/vmlogrdr.o drivers/s390/char/vmlogrdr.c:126:29: error: initializer-string for array of ‘char’ is too long [-Werror=unterminated-string-initialization] 126 | { .system_service = "*LOGREC ", Given that the system_service array intentionally contains a non-null terminated string use an array initializer, instead of string initializer to get rid of this warning. Reviewed-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev --- drivers/s390/char/vmlogrdr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 374f06c77a86..b2d93a6e36c4 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -123,7 +123,7 @@ static DECLARE_WAIT_QUEUE_HEAD(read_wait_queue); */ static struct vmlogrdr_priv_t sys_ser[] = { - { .system_service = "*LOGREC ", + { .system_service = { '*', 'L', 'O', 'G', 'R', 'E', 'C', ' ' }, .internal_name = "logrec", .recording_name = "EREP", .minor_num = 0, @@ -132,7 +132,7 @@ static struct vmlogrdr_priv_t sys_ser[] = { .autorecording = 1, .autopurge = 1, }, - { .system_service = "*ACCOUNT", + { .system_service = { '*', 'A', 'C', 'C', 'O', 'U', 'N', 'T' }, .internal_name = "account", .recording_name = "ACCOUNT", .minor_num = 1, @@ -141,7 +141,7 @@ static struct vmlogrdr_priv_t sys_ser[] = { .autorecording = 1, .autopurge = 1, }, - { .system_service = "*SYMPTOM", + { .system_service = { '*', 'S', 'Y', 'M', 'P', 'T', 'O', 'M' }, .internal_name = "symptom", .recording_name = "SYMPTOM", .minor_num = 2, -- cgit