Skip to content

Commit 87f017d

Browse files
hcahcaAlexander Gordeev
authored andcommitted
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: Gerald Schaefer <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 76bda8a commit 87f017d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/s390/char/vmlogrdr.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static DECLARE_WAIT_QUEUE_HEAD(read_wait_queue);
123123
*/
124124

125125
static struct vmlogrdr_priv_t sys_ser[] = {
126-
{ .system_service = "*LOGREC ",
126+
{ .system_service = { '*', 'L', 'O', 'G', 'R', 'E', 'C', ' ' },
127127
.internal_name = "logrec",
128128
.recording_name = "EREP",
129129
.minor_num = 0,
@@ -132,7 +132,7 @@ static struct vmlogrdr_priv_t sys_ser[] = {
132132
.autorecording = 1,
133133
.autopurge = 1,
134134
},
135-
{ .system_service = "*ACCOUNT",
135+
{ .system_service = { '*', 'A', 'C', 'C', 'O', 'U', 'N', 'T' },
136136
.internal_name = "account",
137137
.recording_name = "ACCOUNT",
138138
.minor_num = 1,
@@ -141,7 +141,7 @@ static struct vmlogrdr_priv_t sys_ser[] = {
141141
.autorecording = 1,
142142
.autopurge = 1,
143143
},
144-
{ .system_service = "*SYMPTOM",
144+
{ .system_service = { '*', 'S', 'Y', 'M', 'P', 'T', 'O', 'M' },
145145
.internal_name = "symptom",
146146
.recording_name = "SYMPTOM",
147147
.minor_num = 2,

0 commit comments

Comments
 (0)