[Mesa-dev] [PATCH] gm107/ir: fix compile time warning in getTEXSMask

Ilia Mirkin imirkin at alum.mit.edu
Wed Nov 7 14:20:44 UTC 2018


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Although I'd rather the return go into the "default:" case, after the
assert, which is the reason for the warning.
On Wed, Nov 7, 2018 at 7:50 AM Karol Herbst <kherbst at redhat.com> wrote:
>
> In function 'uint8_t nv50_ir::getTEXSMask(uint8_t)':
> warning: control reaches end of non-void function [-Wreturn-type]
>
> Reported-by: Moiman at freenode
> Fixes: f821e80213e38e93f96255b3deacb737a600ed40
>        "gm107/ir: use scalar tex instructions where possible"
> Signed-off-by: Karol Herbst <kherbst at redhat.com>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> index 241061ab837..842cf5cb250 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> @@ -2739,6 +2739,7 @@ getTEXSMask(uint8_t mask)
>     default:
>        assert(!"invalid mask");
>     }
> +   return 0;
>  }
>
>  static uint8_t
> --
> 2.19.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list