nvfx: Silence uninitialized variable warnings.
authorVinson Lee <vlee@vmware.com>
Sun, 22 Aug 2010 05:59:46 +0000 (22:59 -0700)
committerVinson Lee <vlee@vmware.com>
Sun, 22 Aug 2010 05:59:46 +0000 (22:59 -0700)
Variables weren't initialized on the error paths.

src/gallium/drivers/nvfx/nvfx_fragprog.c
src/gallium/drivers/nvfx/nvfx_vertprog.c

index 6c8f5c4708e43f4c5b6adf600ec118ba9df8ad08..db33ecd78cfdcd0078734b2d10542fb7360d1f28 100644 (file)
@@ -418,6 +418,8 @@ tgsi_src(struct nvfx_fpc *fpc, const struct tgsi_full_src_register *fsrc)
                break;
        default:
                NOUVEAU_ERR("bad src file\n");
+               src.reg.index = 0;
+               src.reg.type = 0;
                break;
        }
 
index b5dde2592e7659c1dfb1ba32b9c130d9fe83225b..38f37168a18885b5c00ccb62563ac905b29417ab 100644 (file)
@@ -379,6 +379,8 @@ tgsi_src(struct nvfx_vpc *vpc, const struct tgsi_full_src_register *fsrc) {
                break;
        default:
                NOUVEAU_ERR("bad src file\n");
+               src.reg.index = 0;
+               src.reg.type = 0;
                break;
        }
 
@@ -410,6 +412,8 @@ tgsi_dst(struct nvfx_vpc *vpc, const struct tgsi_full_dst_register *fdst) {
                break;
        default:
                NOUVEAU_ERR("bad dst file %i\n", fdst->Register.File);
+               dst.index = 0;
+               dst.type = 0;
                break;
        }