panfrost: Fix non-debug builds
authorIcecream95 <ixn@keemail.me>
Sat, 1 Feb 2020 00:50:35 +0000 (13:50 +1300)
committerMarge Bot <eric+marge@anholt.net>
Sun, 2 Feb 2020 15:33:17 +0000 (15:33 +0000)
For non-debug builds, where assertions are compiled out, GCC complains
about the end of the non-void function panfrost_translate_channel_width
being reached.

Fixes: 226c1efe9a8 ("panfrost: Add more info to some assertions")
Reported-by: Piotr Oniszczuk
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3665>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3665>

src/gallium/drivers/panfrost/pan_format.c

index fd9d0eb973d79b417e0b1d3357088daab224e32d..b4fb38fefedf8287a11c5254a9b1bc9c8aa6e7ce 100644 (file)
@@ -101,6 +101,7 @@ panfrost_translate_channel_width(unsigned size)
         default: {
                 fprintf(stderr, "Invalid width: %d\n", size);
                 assert(0);
+                return 0;
         }
         }
 }