Skip to content

Commit 25b2483

Browse files
PauloMigAlmeidaalexdeucher
authored andcommitted
drm/amdgpu: Replace remaining 1-element array with flex-array
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct GOP_VBIOS_CONTENT and refactor the rest of the code accordingly. Important to mention is that doing a build before/after this patch results in no functional binary output differences. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: KSPP#79 Link: KSPP#238 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Signed-off-by: Paulo Miguel Almeida <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 501fd24 commit 25b2483

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/include/atombios.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9292,7 +9292,7 @@ typedef struct {
92929292

92939293
typedef struct {
92949294
VFCT_IMAGE_HEADER VbiosHeader;
9295-
UCHAR VbiosContent[1];
9295+
UCHAR VbiosContent[];
92969296
}GOP_VBIOS_CONTENT;
92979297

92989298
typedef struct {

0 commit comments

Comments
 (0)