st/nine: Remove useless code in nine_shader
authorAxel Davy <axel.davy@ens.fr>
Wed, 12 Oct 2016 16:58:24 +0000 (18:58 +0200)
committerAxel Davy <axel.davy@ens.fr>
Thu, 13 Oct 2016 19:16:35 +0000 (21:16 +0200)
Since 1604efa6fda9b780e8537a131ad77f3e83e5a67a,
lconsti and lconstb don't need to be initialized.

Remove some leftovers from the previous code (which
has now invalid use of ARRAY_SIZE on a pointer instead
of an array).

Reported by Coverity.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_shader.c

index 0f8bcdd7d7f30dd7bdb528389a27c198267fd184..ab21dafc12441a49463e262e6e5fc5a538cbbcbd 100644 (file)
@@ -3361,11 +3361,6 @@ tx_ctor(struct shader_translator *tx, struct nine_shader_info *info)
     for (i = 0; i < ARRAY_SIZE(tx->regs.vT); ++i)
         tx->regs.vT[i] = ureg_src_undef();
 
-    for (i = 0; i < ARRAY_SIZE(tx->lconsti); ++i)
-        tx->lconsti[i].idx = -1;
-    for (i = 0; i < ARRAY_SIZE(tx->lconstb); ++i)
-        tx->lconstb[i].idx = -1;
-
     sm1_read_version(tx);
 
     info->version = (tx->version.major << 4) | tx->version.minor;