[Mesa-dev] [PATCH] i965: fix compilation warnings in blorp

Tapani Pälli tapani.palli at intel.com
Fri Aug 19 07:39:19 UTC 2016


(warning: ‘surftype’ may be used uninitialized ...)

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 src/mesa/drivers/dri/i965/gen6_blorp.c | 2 ++
 src/mesa/drivers/dri/i965/gen7_blorp.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.c b/src/mesa/drivers/dri/i965/gen6_blorp.c
index abdcf17..6476fa6 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.c
@@ -711,6 +711,8 @@ gen6_blorp_emit_depth_stencil_config(struct brw_context *brw,
    case ISL_SURF_DIM_3D:
       surftype = BRW_SURFACE_3D;
       break;
+   default:
+      unreachable("not reached");
    }
 
    /* 3DSTATE_DEPTH_BUFFER */
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c
index d35d6c6..96e2b07 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.c
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.c
@@ -497,6 +497,8 @@ gen7_blorp_emit_depth_stencil_config(struct brw_context *brw,
    case ISL_SURF_DIM_3D:
       surftype = BRW_SURFACE_3D;
       break;
+   default:
+      unreachable("not reached");
    }
 
    /* 3DSTATE_DEPTH_BUFFER */
-- 
2.7.4



More information about the mesa-dev mailing list