Skip to contentSkip to conversation

Fix gcc 4.6.0 set but unused variable warnings

PATCH In review Francesco Marella 1 participant 1 message Feb 17, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Fix gcc 4.6.0 set but unused variable warnings

---
 src/drmmode_display.c |    2 --
 src/nv_driver.c       |    3 +--
 2 files changed, 1 insertions(+), 4 deletions(-)
src/drmmode_display.c +0 -2
index d14dd80..43a2672 100644
@@ -1158,7 +1158,6 @@ static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
 
 Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
 {
-	xf86CrtcConfigPtr   xf86_config;
 	drmmode_ptr drmmode;
 	int i;
 
@@ -1167,7 +1166,6 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
 	drmmode->fb_id = 0;
 
 	xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
-	xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 
 	drmmode->cpp = cpp;
 	drmmode->mode_res = drmModeGetResources(drmmode->fd);
src/nv_driver.c +1 -2
index 523cab8..b959745 100644
@@ -601,7 +601,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 	MessageType from;
 	const char *reason;
 	uint64_t v;
-	int ret, i;
+	int ret;
 
 	if (flags & PROBE_DETECT) {
 		EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
@@ -609,7 +609,6 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 		if (!pEnt)
 			return FALSE;
 
-		i = pEnt->index;
 		free(pEnt);
 
 		return TRUE;
Signature · 1 line
1.7.4