summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c5
-rw-r--r--src/mesa/drivers/dri/unichrome/via_texcombine.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index 50342f3ff59..4ca4a071a5f 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -100,6 +100,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
void * const psc = sPriv->psc->screenConfigs;
+ drmAddress map;
if (sPriv->devPrivSize != sizeof(VIADRIRec)) {
fprintf(stderr,"\nERROR! sizeof(VIADRIRec) does not match passed size from device driver\n");
@@ -150,7 +151,7 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
if (drmMap(sPriv->fd,
gDRIPriv->regs.handle,
gDRIPriv->regs.size,
- (drmAddress *)&viaScreen->reg) != 0) {
+ &map) != 0) {
FREE(viaScreen);
sPriv->private = NULL;
__driUtilMessage("viaInitDriver: drmMap regs failed");
@@ -162,8 +163,8 @@ viaInitDriver(__DRIscreenPrivate *sPriv)
gDRIPriv->agp.handle,
gDRIPriv->agp.size,
(drmAddress *)&viaScreen->agpLinearStart) != 0) {
- FREE(viaScreen);
drmUnmap(viaScreen->reg, gDRIPriv->agp.size);
+ FREE(viaScreen);
sPriv->private = NULL;
__driUtilMessage("viaInitDriver: drmMap agp failed");
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/unichrome/via_texcombine.c b/src/mesa/drivers/dri/unichrome/via_texcombine.c
index e691c553f99..d604457bfd8 100644
--- a/src/mesa/drivers/dri/unichrome/via_texcombine.c
+++ b/src/mesa/drivers/dri/unichrome/via_texcombine.c
@@ -111,7 +111,7 @@ viaTexCombineState( struct via_context *vmesa,
unsigned constant_alpha[3];
unsigned bias_alpha = 0;
unsigned abc_alpha = 0;
- const struct gl_texture_unit const * texUnit =
+ const struct gl_texture_unit * texUnit =
&vmesa->glCtx->Texture.Unit[unit];
unsigned env_color[4];