[Mesa-dev] [PATCH 1/2] svga: init fill variable to avoid compiler warning

Brian Paul brianp at vmware.com
Mon Mar 4 17:20:57 UTC 2019


MinGW release builds warns about use of a possbily uninitialized
variable here.
---
 src/gallium/drivers/svga/svga_pipe_rasterizer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
index 1dbf5b6..7d5936f 100644
--- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c
+++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c
@@ -257,7 +257,7 @@ svga_create_rasterizer_state(struct pipe_context *pipe,
    {
       int fill_front = templ->fill_front;
       int fill_back = templ->fill_back;
-      int fill;
+      int fill = PIPE_POLYGON_MODE_FILL;
       boolean offset_front = util_get_offset(templ, fill_front);
       boolean offset_back = util_get_offset(templ, fill_back);
       boolean offset = FALSE;
-- 
1.8.5.6



More information about the mesa-dev mailing list