summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-17 11:48:57 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-17 11:48:57 -0700
commite285658e60d9cf772dda4b2c713ad2a0d4cef569 (patch)
tree6e528fcfec4d5fc1366a0d54c5e440b0ff35ebf7
parent2f2436b4fe70a1f1a47c4ed112e8aefba3c8efe3 (diff)
downloadxorg-driver-xf86-video-vesa-e285658e60d9cf772dda4b2c713ad2a0d4cef569.tar.gz
VESAValidMode: remove duplicate call to VESAGetRec
Found by cppcheck: src/vesa.c:356:11: style: Redundant initialization for 'pVesa'. The initialized value is overwritten before it is read. [redundantInitialization] pVesa = VESAGetRec(pScrn); ^ src/vesa.c:350:19: note: pVesa is initialized VESAPtr pVesa = VESAGetRec(pScrn); ^ src/vesa.c:356:11: note: pVesa is overwritten pVesa = VESAGetRec(pScrn); ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/vesa.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/vesa.c b/src/vesa.c
index b6b0367..a8cc4a6 100644
--- a/src/vesa.c
+++ b/src/vesa.c
@@ -353,8 +353,6 @@ VESAValidMode(SCRN_ARG_TYPE arg, DisplayModePtr p, Bool flag, int pass)
DisplayModePtr mode;
float v;
- pVesa = VESAGetRec(pScrn);
-
if (pass != MODECHECK_FINAL) {
if (!warned) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "VESAValidMode called unexpectedly\n");