dri/nouveau: Silence uninitialized variable warning.
authorVinson Lee <vlee@vmware.com>
Thu, 4 Nov 2010 01:13:14 +0000 (18:13 -0700)
committerVinson Lee <vlee@vmware.com>
Thu, 4 Nov 2010 01:20:22 +0000 (18:20 -0700)
Fixes this GCC warning.
nouveau_vbo_t.c: In function 'nv10_vbo_render_prims':
nouveau_render_t.c:161: warning: 'max_out' may be used uninitialized in this function
nouveau_render_t.c:161: note: 'max_out' was declared here

src/mesa/drivers/dri/nouveau/nouveau_render_t.c

index 78379482832239338f150a01ef46f00b02f1c780..43164ec34f81179a19fb6c28241d4f75c1560a32 100644 (file)
@@ -173,6 +173,11 @@ get_max_vertices(struct gl_context *ctx, const struct _mesa_index_buffer *ib,
                        case GL_UNSIGNED_BYTE:
                                max_out = MAX_OUT_I16;
                                break;
+
+                       default:
+                               assert(0);
+                               max_out = 0;
+                               break;
                        }
                } else {
                        max_out = MAX_OUT_L;