[Mesa-dev] [PATCH 3/3] mesa/program/prog_optimize.c: Silence two warnings
Emil Velikov
emil.l.velikov at gmail.com
Tue Jan 16 15:17:31 UTC 2018
On 15 January 2018 at 16:10, Gert Wollny <gw.fossdev at gmail.com> wrote:
> Specifically, -Wsign-compare (explicite cast) and -Wunused-param (annotate)
>
> Signed-off-by: Gert Wollny <gw.fossdev at gmail.com>
> ---
> src/mesa/program/prog_optimize.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c
> index 6a228ba258..f6304c3dad 100644
> --- a/src/mesa/program/prog_optimize.c
> +++ b/src/mesa/program/prog_optimize.c
> @@ -925,7 +925,7 @@ update_interval(GLint intBegin[], GLint intEnd[],
> * of the outermost loop that doesn't contain its definition.
> */
> for (i = 0; i < loopStackDepth; i++) {
> - if (intBegin[index] < loopStack[i].Start) {
> + if (intBegin[index] < (GLint)loopStack[i].Start) {
> end = loopStack[i].End;
> break;
> }
> @@ -1312,7 +1312,7 @@ _mesa_simplify_cmp(struct gl_program * program)
> * instructions, temp regs, etc.
> */
> void
> -_mesa_optimize_program(struct gl_context *ctx, struct gl_program *program,
> +_mesa_optimize_program(UNUSED struct gl_context *ctx, struct gl_program *program,
I would just drop the ctx here and in 2/3. Maybe even fold the two patches.
Either way 2/3 and 3/3 are
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
-Emil
More information about the mesa-dev
mailing list