Skip to content

Commit 4816c3d

Browse files
committed
[osd] fix gcc 15 warings where character arry is defined as non-nul terminated string literal
1 parent 37cc049 commit 4816c3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/io/vtx_string.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const char * const vtx58BandNames[VTX_STRING_5G8_BAND_COUNT + 1] = {
5151
"R",
5252
};
5353

54-
const char vtx58BandLetter[VTX_STRING_5G8_BAND_COUNT + 1] __attribute__ ((nonstring)) = "-ABEFR";
54+
const char vtx58BandLetter[VTX_STRING_5G8_BAND_COUNT + 1] = {'-', 'A', 'B', 'E', 'F', 'R'};
5555

5656
const char * const vtx58ChannelNames[VTX_STRING_5G8_CHAN_COUNT + 1] = {
5757
"-", "1", "2", "3", "4", "5", "6", "7", "8",
@@ -73,7 +73,7 @@ const char * const vtx1G3BandNames[VTX_STRING_1G3_BAND_COUNT + 1] = {
7373
"B",
7474
};
7575

76-
const char vtx1G3BandLetter[VTX_STRING_1G3_BAND_COUNT + 1] __attribute__ ((nonstring)) = "-AB";
76+
const char vtx1G3BandLetter[VTX_STRING_1G3_BAND_COUNT + 1] = {'-', 'A', 'B'};
7777

7878
const char * const vtx1G3ChannelNames[VTX_STRING_1G3_CHAN_COUNT + 1] = {
7979
"-", "1", "2", "3", "4", "5", "6", "7", "8",

0 commit comments

Comments
 (0)