radeonsi: use unreachable to fix a warning
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 2 Apr 2017 17:22:11 +0000 (20:22 +0300)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 2 Apr 2017 22:46:35 +0000 (00:46 +0200)
si_state.c: In function ‘si_make_texture_descriptor’:
si_state.c:3240:25: warning: ‘num_format’ may be used uninitialized
si_state.c:3240:12: warning: ‘data_format’ may be used uninitialized

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 35fadec2a1e8f3cba7433b1cb8429e32add6675b..4a6b61587fb77cbf68c1b1bdf82cadf1412fbf49 100644 (file)
@@ -3254,7 +3254,7 @@ si_make_texture_descriptor(struct si_screen *screen,
                                num_format = V_008F14_IMG_FMASK_32_8_8;
                                break;
                        default:
-                               assert(0);
+                               unreachable("invalid nr_samples");
                        }
                } else {
                        switch (res->nr_samples) {
@@ -3268,7 +3268,7 @@ si_make_texture_descriptor(struct si_screen *screen,
                                data_format = V_008F14_IMG_DATA_FORMAT_FMASK32_S8_F8;
                                break;
                        default:
-                               assert(0);
+                               unreachable("invalid nr_samples");
                        }
                        num_format = V_008F14_IMG_NUM_FORMAT_UINT;
                }