The attached patches remove some unused-but-set-variables from mesa.
diff -purN mesa-7.12_orig//src/mesa/drivers/osmesa/osmesa.c mesa-7.12/src/mesa/drivers/osmesa/osmesa.c
--- mesa-7.12_orig//src/mesa/drivers/osmesa/osmesa.c	2011-06-10 12:05:04.000000000 +0200
+++ mesa-7.12/src/mesa/drivers/osmesa/osmesa.c	2011-10-19 15:48:51.080213224 +0200
@@ -795,14 +795,6 @@ osmesa_renderbuffer_storage(struct gl_co
                             GLenum internalFormat, GLuint width, GLuint height)
 {
    const OSMesaContext osmesa = OSMESA_CONTEXT(ctx);
-   GLint bpc; /* bits per channel */
-
-   if (rb->DataType == GL_UNSIGNED_BYTE)
-      bpc = 8;
-   else if (rb->DataType == GL_UNSIGNED_SHORT)
-      bpc = 16;
-   else
-      bpc = 32;
 
    /* Note: we can ignoring internalFormat for "window-system" renderbuffers */
    (void) internalFormat;
diff --git a/src/gallium/state_trackers/vega/vg_translate.c b/src/gallium/state_trackers/vega/vg_translate.c
index 03575ca..06cc003 100644
--- a/src/gallium/state_trackers/vega/vg_translate.c
+++ b/src/gallium/state_trackers/vega/vg_translate.c
@@ -131,10 +131,7 @@ void _vega_pack_rgba_span_float(struct vg_context *ctx,
    case VG_sL_8: {
       VGubyte *dst = (VGubyte *)dstAddr;
       for (i = 0; i < n; ++i) {
-         VGubyte r, g, b, a;
-         r = float_to_ubyte(rgba[i][0]);
-         g = float_to_ubyte(rgba[i][1]);
-         b = float_to_ubyte(rgba[i][2]);
+         VGubyte a;
          a = float_to_ubyte(rgba[i][3]);
 
          dst[i] =  a;
@@ -183,10 +180,7 @@ void _vega_pack_rgba_span_float(struct vg_context *ctx,
    case VG_lL_8: {
       VGubyte *dst = (VGubyte *)dstAddr;
       for (i = 0; i < n; ++i) {
-         VGubyte r, g, b ,a;
-         r = float_to_ubyte(rgba[i][0]);
-         g = float_to_ubyte(rgba[i][1]);
-         b = float_to_ubyte(rgba[i][2]);
+         VGubyte a;
          a = float_to_ubyte(rgba[i][3]);
          dst[i] = a;
       }
@@ -196,10 +190,7 @@ void _vega_pack_rgba_span_float(struct vg_context *ctx,
    case VG_A_8: {
       VGubyte *dst = (VGubyte *)dstAddr;
       for (i = 0; i < n; ++i) {
-         VGubyte r, g, b, a;
-         r = float_to_ubyte(rgba[i][0]);
-         g = float_to_ubyte(rgba[i][1]);
-         b = float_to_ubyte(rgba[i][2]);
+         VGubyte a;
          a = float_to_ubyte(rgba[i][3]);
 
          dst[i] = a;
@@ -227,10 +218,7 @@ void _vega_pack_rgba_span_float(struct vg_context *ctx,
    case VG_A_1: {
       VGshort *dst = (VGshort *)dstAddr;
       for (i = 0; i < n; ++i) {
-         VGubyte r, g, b, a;
-         r = float_to_ubyte(rgba[i][0]);
-         g = float_to_ubyte(rgba[i][1]);
-         b = float_to_ubyte(rgba[i][2]);
+         VGubyte a;
          a = float_to_ubyte(rgba[i][3]);
 
          dst[i] =   (a & (128));
@@ -241,11 +229,8 @@ void _vega_pack_rgba_span_float(struct vg_context *ctx,
    case VG_A_4: {
       VGshort *dst = (VGshort *)dstAddr;
       for (i = 0; i < n; ++i) {
-         VGubyte r, g, b, a;
+         VGubyte a;
          VGubyte res;
-         r = float_to_ubyte(rgba[i][0]);
-         g = float_to_ubyte(rgba[i][1]);
-         b = float_to_ubyte(rgba[i][2]);
          a = float_to_ubyte(rgba[i][3]);
 
          res = a/4;
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to