[Mesa-dev] [PATCH] radeonsi: silent a compiler warning

Nicolai Hähnle nhaehnle at gmail.com
Wed May 10 11:45:40 UTC 2017


On 10.05.2017 12:20, Samuel Pitoiset wrote:
> This fixes:
>
> si_shader.c: In function ‘si_shader_dump_stats’:
> si_shader.c:6704:31: warning: passing argument 1 of ‘si_get_max_workgroup_size’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>      si_get_max_workgroup_size(shader);
>                                ^~~~~~
> si_shader.c:5832:17: note: expected ‘struct si_shader *’ but argument is of type ‘const struct si_shader *’
>  static unsigned si_get_max_workgroup_size(struct si_shader *shader)
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

Thanks for fixing this. I'd love a build system where less noise scrolls 
past :/

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>


> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 08055007ca..b969376e9d 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -5829,7 +5829,7 @@ static void declare_lds_as_pointer(struct si_shader_context *ctx)
>  		"lds");
>  }
>
> -static unsigned si_get_max_workgroup_size(struct si_shader *shader)
> +static unsigned si_get_max_workgroup_size(const struct si_shader *shader)
>  {
>  	switch (shader->selector->type) {
>  	case PIPE_SHADER_TESS_CTRL:
>


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list