Mesa (master): panfrost: Fix non-debug builds

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Feb 2 15:48:17 UTC 2020


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

Author: Icecream95 <ixn at keemail.me>
Date:   Sat Feb  1 13:50:35 2020 +1300

panfrost: Fix non-debug builds

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 at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at 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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/panfrost/pan_format.c b/src/gallium/drivers/panfrost/pan_format.c
index fd9d0eb973d..b4fb38fefed 100644
--- a/src/gallium/drivers/panfrost/pan_format.c
+++ b/src/gallium/drivers/panfrost/pan_format.c
@@ -101,6 +101,7 @@ panfrost_translate_channel_width(unsigned size)
         default: {
                 fprintf(stderr, "Invalid width: %d\n", size);
                 assert(0);
+                return 0;
         }
         }
 }



More information about the mesa-commit mailing list