fix: util/format: unused variable ‘desc’ [-Wunused-variable]
authorKai Wasserbäch <kai@dev.carbon-project.org>
Sat, 17 Sep 2022 11:25:53 +0000 (13:25 +0200)
committerMarge Bot <emma+marge@anholt.net>
Mon, 19 Sep 2022 22:02:16 +0000 (22:02 +0000)
Only used in debug builds.

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18643>

src/util/format/u_format.c

index c071250..b8100fc 100644 (file)
@@ -1354,7 +1354,7 @@ util_format_rgbx_to_rgba(enum pipe_format format)
    case PIPE_FORMAT_B10G10R10X2_SINT:
       return PIPE_FORMAT_B10G10R10A2_SINT;
    default: {
-      const struct util_format_description *desc = util_format_description(format);
+      ASSERTED const struct util_format_description *desc = util_format_description(format);
 
       /* Assert that the format doesn't contain X instead of A. */
       assert(desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS ||