mirror of
https://github.com/X11Libre/xf86-video-ast.git
synced 2026-03-23 17:19:26 +00:00
ASTSetMode: Handle -Wmaybe-uninitialized warnings
In function ‘vSetStdReg’,
inlined from ‘ASTSetMode’ at ast_mode.c:522:9:
ast_mode.c:724:10: warning: ‘vgamodeinfo.pStdTableEntry’ may be used
uninitialized [-Wmaybe-uninitialized]
724 | jReg = pStdModePtr->MISC;
| ~~~~~^~~~~~~~~~~~~~~~~~~
ast_mode.c: In function ‘ASTSetMode’:
ast_mode.c:496:21: note: ‘vgamodeinfo.pStdTableEntry’ was declared here
496 | VBIOS_MODE_INFO vgamodeinfo;
| ^~~~~~~~~~~
In function ‘vSetCRTCReg’,
inlined from ‘ASTSetMode’ at ast_mode.c:523:9:
ast_mode.c:780:70: warning: ‘vgamodeinfo.pEnhTableEntry’ may be used
uninitialized [-Wmaybe-uninitialized]
780 | if ((pAST->jChipType == AST2500) && (pVGAModeInfo->pEnhTableEntry->Flags & AST2500PreCatchCRT))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
ast_mode.c: In function ‘ASTSetMode’:
ast_mode.c:496:21: note: ‘vgamodeinfo.pEnhTableEntry’ was declared here
496 | VBIOS_MODE_INFO vgamodeinfo;
| ^~~~~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-ast/-/merge_requests/15>
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult
parent
daab9776fd
commit
1be66031a8
@@ -493,7 +493,7 @@ Bool
|
||||
ASTSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
|
||||
{
|
||||
ASTRecPtr pAST;
|
||||
VBIOS_MODE_INFO vgamodeinfo;
|
||||
VBIOS_MODE_INFO vgamodeinfo = { 0 };
|
||||
|
||||
pAST = ASTPTR(pScrn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user