[Mesa-dev] [PATCH v2] nv30: Add unused attribute to function nv40_fp_bra.
Emil Velikov
emil.l.velikov at gmail.com
Sat Mar 7 10:41:41 PST 2015
On 07/03/15 07:43, Vinson Lee wrote:
> Silences GCC unused-function warning.
>
> nv30/nvfx_fragprog.c:333:1: warning: ‘nv40_fp_bra’ defined but not used [-Wunused-function]
> nv40_fp_bra(struct nvfx_fpc *fpc, unsigned target)
> ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
> index 6600997..abd51c8 100644
> --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
> +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c
> @@ -329,7 +329,7 @@ nv40_fp_rep(struct nvfx_fpc *fpc, unsigned count, unsigned target)
> }
>
> /* warning: this only works forward, and probably only if not inside any IF */
> -static void
> +static __attribute__((unused)) void
Would be nice to define this as a macro in util/macros.h so that others
can use it.
Thanks
Emil
More information about the mesa-dev
mailing list