Commit 87f017d0 authored by Heiko Carstens's avatar Heiko Carstens Committed by Alexander Gordeev
Browse files

s390/vmlogrdr: Use array instead of string initializer



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: default avatarGerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
parent 76bda8a1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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,