Mesa (main): tgsi_exec: Mark the store file default case as unreachable.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 6 00:13:13 UTC 2021


Module: Mesa
Branch: main
Commit: e500e6cd25fe63f040220c0abfdbad903a5f9f6f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e500e6cd25fe63f040220c0abfdbad903a5f9f6f

Author: Eric Anholt <eric at anholt.net>
Date:   Mon May  3 21:19:38 2021 -0700

tgsi_exec: Mark the store file default case as unreachable.

It isn't reached, and shouldn't be, and it's not like returning NULL
(instead of the &null case for TGSI_FILE_NULL) will do anything good.

Shaves another tiny bit of dead code off of release builds.

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10605>

---

 src/gallium/auxiliary/tgsi/tgsi_exec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 50a8efcc6b7..403140fc58a 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -1809,8 +1809,7 @@ store_dest_dstret(struct tgsi_exec_machine *mach,
       break;
 
    default:
-      assert( 0 );
-      return NULL;
+      unreachable("Bad destination file");
    }
 
    return dst;



More information about the mesa-commit mailing list