[Mesa-dev] [PATCH] anv: fix warning about unused width variable.

Jason Ekstrand jason at jlekstrand.net
Fri Feb 19 16:03:54 UTC 2016


On Tue, Feb 16, 2016 at 6:23 PM, Dave Airlie <airlied at gmail.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> We don't use width outside the debug clause here.
>

Thanks


> ---
>  src/vulkan/gen_pack_header.py | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/vulkan/gen_pack_header.py b/src/vulkan/gen_pack_header.py
> index 3cabb58..75c4f26 100755
> --- a/src/vulkan/gen_pack_header.py
> +++ b/src/vulkan/gen_pack_header.py
> @@ -62,11 +62,10 @@ __gen_mbo(uint32_t start, uint32_t end)
>  static inline uint64_t
>  __gen_uint(uint64_t v, uint32_t start, uint32_t end)
>  {
> -   const int width = end - start + 1;
> -
>     __gen_validate_value(v);
>
>  #if DEBUG
> +   const int width = end - start + 1;
>     if (width < 64) {
>        const uint64_t max = (1ull << width) - 1;
>        assert(v <= max);
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160219/79bc9543/attachment-0001.html>


More information about the mesa-dev mailing list