[Mesa-stable] Passing on commit 803f755edeabd for 9.1 branch

Ian Romanick idr at freedesktop.org
Tue Jul 30 13:58:30 PDT 2013


On 07/30/2013 12:18 PM, Carl Worth wrote:
> Hi Ian,
>
> The patch below does not apply trivially to the 9.1 branch.
>
> Meanwhile, I believe there's no harm in skipping this patch since it
> doesn't actually change the implementation, but merely reduces compiler
> warning spam.
>
> Let me know if you disagree.

This is another just-for-9.2 patch.  Ugh.

> -Carl
>
> commit 803f755edeabd1b0af3d8f4ebf2005333e152ad4
> Author: Ian Romanick <ian.d.romanick at intel.com>
> Date:   Fri Jul 26 13:37:29 2013 -0700
>
>      glsl: Less const for glsl_type convenience accessors
>
>      The second 'const' says that the pointer itself is constant.  This in
>      unenforcible in C++, so GCC emits a warning (see) below for each of
>      these functions in every file that includes glsl_types.h.  It's a lot of
>      warning spam.
>
>      ../../../src/glsl/glsl_types.h:176:58: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
>
>      Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>      Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>      Cc: mesa-stable at lists.freedesktop.org
>
> diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
> index 9d3691b..8324b8a 100644
> --- a/src/glsl/glsl_types.cpp
> +++ b/src/glsl/glsl_types.cpp
> @@ -281,7 +281,7 @@ glsl_type::glsl_type(const glsl_type *array, unsigned length) :
>   }
>
>
> -const glsl_type *const
> +const glsl_type *
>   glsl_type::vec(unsigned components)
>   {
>      if (components == 0 || components > 4)
> @@ -294,7 +294,7 @@ glsl_type::vec(unsigned components)
>   }
>
>
> -const glsl_type *const
> +const glsl_type *
>   glsl_type::ivec(unsigned components)
>   {
>      if (components == 0 || components > 4)
> @@ -307,7 +307,7 @@ glsl_type::ivec(unsigned components)
>   }
>
>
> -const glsl_type *const
> +const glsl_type *
>   glsl_type::uvec(unsigned components)
>   {
>      if (components == 0 || components > 4)
> @@ -320,7 +320,7 @@ glsl_type::uvec(unsigned components)
>   }
>
>
> -const glsl_type *const
> +const glsl_type *
>   glsl_type::bvec(unsigned components)
>   {
>      if (components == 0 || components > 4)
> diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
> index cb52080..8172309 100644
> --- a/src/glsl/glsl_types.h
> +++ b/src/glsl/glsl_types.h
> @@ -170,10 +170,10 @@ struct glsl_type {
>       * Convenience accessors for vector types (shorter than get_instance()).
>       * @{
>       */
> -   static const glsl_type *const vec(unsigned components);
> -   static const glsl_type *const ivec(unsigned components);
> -   static const glsl_type *const uvec(unsigned components);
> -   static const glsl_type *const bvec(unsigned components);
> +   static const glsl_type *vec(unsigned components);
> +   static const glsl_type *ivec(unsigned components);
> +   static const glsl_type *uvec(unsigned components);
> +   static const glsl_type *bvec(unsigned components);
>      /**@}*/
>
>      /**
>



More information about the mesa-stable mailing list