Module Name: xsrc
Committed By: apb
Date: Thu Jan 31 08:24:32 UTC 2013
Modified Files:
xsrc/external/mit/MesaLib/dist/src/mesa/shader: prog_execute.c
xsrc/external/mit/fontconfig/dist/src: fcname.c
xsrc/external/mit/xf86-video-nv/dist/src: g80_output.c
Log Message:
If you are going to test an enum value for equality with -1,
and -1 is out of range for the enum type,
then at least cast the -1 to the appropriate enum type.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
xsrc/external/mit/MesaLib/dist/src/mesa/shader/prog_execute.c
cvs rdiff -u -r1.1.1.2 -r1.2 xsrc/external/mit/fontconfig/dist/src/fcname.c
cvs rdiff -u -r1.1.1.5 -r1.2 \
xsrc/external/mit/xf86-video-nv/dist/src/g80_output.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/MesaLib/dist/src/mesa/shader/prog_execute.c
diff -u xsrc/external/mit/MesaLib/dist/src/mesa/shader/prog_execute.c:1.1.1.4 xsrc/external/mit/MesaLib/dist/src/mesa/shader/prog_execute.c:1.2
--- xsrc/external/mit/MesaLib/dist/src/mesa/shader/prog_execute.c:1.1.1.4 Mon Jul 19 05:31:34 2010
+++ xsrc/external/mit/MesaLib/dist/src/mesa/shader/prog_execute.c Thu Jan 31 08:24:31 2013
@@ -1767,7 +1767,7 @@ _mesa_execute_program(GLcontext * ctx,
break;
case OPCODE_PRINT:
{
- if (inst->SrcReg[0].File != -1) {
+ if (inst->SrcReg[0].File != (GLuint)-1) {
GLfloat a[4];
fetch_vector4(&inst->SrcReg[0], machine, a);
printf("%s%g, %g, %g, %g\n", (const char *) inst->Data,
Index: xsrc/external/mit/fontconfig/dist/src/fcname.c
diff -u xsrc/external/mit/fontconfig/dist/src/fcname.c:1.1.1.2 xsrc/external/mit/fontconfig/dist/src/fcname.c:1.2
--- xsrc/external/mit/fontconfig/dist/src/fcname.c:1.1.1.2 Sun Nov 21 06:35:32 2010
+++ xsrc/external/mit/fontconfig/dist/src/fcname.c Thu Jan 31 08:24:32 2013
@@ -372,7 +372,7 @@ FcObjectFini (void)
FcObjectBuckets[i] = 0;
}
for (i = 0; i < FcObjectsNumber; i++)
- if (FcObjects[i].type == -1)
+ if (FcObjects[i].type == (FcType)-1)
free ((void*) FcObjects[i].object);
if (FcObjects != _FcBaseObjectTypes)
free (FcObjects);
Index: xsrc/external/mit/xf86-video-nv/dist/src/g80_output.c
diff -u xsrc/external/mit/xf86-video-nv/dist/src/g80_output.c:1.1.1.5 xsrc/external/mit/xf86-video-nv/dist/src/g80_output.c:1.2
--- xsrc/external/mit/xf86-video-nv/dist/src/g80_output.c:1.1.1.5 Mon Aug 9 16:17:55 2010
+++ xsrc/external/mit/xf86-video-nv/dist/src/g80_output.c Thu Jan 31 08:24:32 2013
@@ -136,7 +136,7 @@ static Bool G80ReadPortMapping(int scrnI
"VGA%d: unrecognized port %d\n", or, port);
break;
}
- if(pNv->i2cMap[port].dac != -1) {
+ if(pNv->i2cMap[port].dac != (ORNum)-1) {
xf86DrvMsg(scrnIndex, X_WARNING,
"DDC routing table corrupt! DAC %i -> %i for "
"port %i\n", or, pNv->i2cMap[port].dac, port);
@@ -167,7 +167,7 @@ static Bool G80ReadPortMapping(int scrnI
"DVI%d: unrecognized port %d\n", or, port);
break;
}
- if(pNv->i2cMap[port].sor != -1)
+ if(pNv->i2cMap[port].sor != (ORNum)-1)
xf86DrvMsg(scrnIndex, X_WARNING,
"DDC routing table corrupt! SOR %i -> %i for "
"port %i\n", or, pNv->i2cMap[port].sor, port);
@@ -226,9 +226,9 @@ static Bool G80ReadPortMapping(int scrnI
xf86DrvMsg(scrnIndex, X_PROBED, " [N/A] -> SOR%i (LVDS)\n", pNv->lvds.or);
}
for(i = 0; i < G80_NUM_I2C_PORTS; i++) {
- if(pNv->i2cMap[i].dac != -1)
+ if(pNv->i2cMap[i].dac != (ORNum)-1)
xf86DrvMsg(scrnIndex, X_PROBED, " Bus %i -> DAC%i\n", i, pNv->i2cMap[i].dac);
- if(pNv->i2cMap[i].sor != -1)
+ if(pNv->i2cMap[i].sor != (ORNum)-1)
xf86DrvMsg(scrnIndex, X_PROBED, " Bus %i -> SOR%i\n", i, pNv->i2cMap[i].sor);
}
@@ -445,7 +445,7 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
I2CBusPtr i2c;
char i2cName[16];
- if(pNv->i2cMap[i].dac == -1 && pNv->i2cMap[i].sor == -1)
+ if(pNv->i2cMap[i].dac == (ORNum)-1 && pNv->i2cMap[i].sor == (ORNum)-1)
/* No outputs on this port */
continue;
@@ -458,9 +458,9 @@ G80CreateOutputs(ScrnInfoPtr pScrn)
continue;
}
- if(pNv->i2cMap[i].dac != -1)
+ if(pNv->i2cMap[i].dac != (ORNum)-1)
dac = G80CreateDac(pScrn, pNv->i2cMap[i].dac);
- if(pNv->i2cMap[i].sor != -1)
+ if(pNv->i2cMap[i].sor != (ORNum)-1)
sor = G80CreateSor(pScrn, pNv->i2cMap[i].sor, TMDS);
if(dac) {