[Mesa-dev] [PATCH 13/15] radeon: remove duplicate 'const' specifier

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 12 14:26:09 UTC 2017


On 12 April 2017 at 08:45, Samuel Pitoiset <samuel.pitoiset at gmail.com> wrote:
>
>
> On 04/12/2017 07:53 AM, Nils Wallménius wrote:
>>
>>
>>
>> Den 11 apr. 2017 20:00 skrev "Samuel Pitoiset" <samuel.pitoiset at gmail.com
>> <mailto:samuel.pitoiset at gmail.com>>:
>>
>>     Fixes the following Clang warning.
>>
>>     In file included from radeon_debug.c:32:
>>     ./radeon_common_context.h:500:19: warning: duplicate 'const'
>>     declaration specifier [-Wduplicate-decl-specifier]
>>     extern const char const *radeonVendorString;
>>
>>     Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com
>>     <mailto:samuel.pitoiset at gmail.com>>
>>
>>     ---
>>       src/mesa/drivers/dri/radeon/radeon_common_context.c | 2 +-
>>       src/mesa/drivers/dri/radeon/radeon_common_context.h | 2 +-
>>       2 files changed, 2 insertions(+), 2 deletions(-)
>>
>>     diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c
>>     b/src/mesa/drivers/dri/radeon/radeon_common_context.c
>>     index d981ca24e5..2c12b62d82 100644
>>     --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
>>     +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
>>     @@ -70,7 +70,7 @@ static const char* get_chip_family_name(int
>>     chip_family)
>>              }
>>       }
>>
>>     -const char const *radeonVendorString = "Mesa Project";
>>     +const char *radeonVendorString = "Mesa Project";
>>
>>       /* Return complete renderer string.
>>        */
>>     diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.h
>>     b/src/mesa/drivers/dri/radeon/radeon_common_context.h
>>     index d142a871b4..a85bedf31f 100644
>>     --- a/src/mesa/drivers/dri/radeon/radeon_common_context.h
>>     +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.h
>>     @@ -497,7 +497,7 @@ static inline __DRIdrawable*
>>     radeon_get_readable(radeonContextPtr radeon)
>>              return radeon->driContext->driReadablePriv;
>>       }
>>
>>     -extern const char const *radeonVendorString;
>>     +extern const char *radeonVendorString;
>>
>>       const char *radeonGetRendererString(radeonScreenPtr radeonScreen);
>>
>>     --
>>     2.12.2
>>
>>     _______________________________________________
>>     mesa-dev mailing list
>>     mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
>>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>     <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>>
>>
>> Hi Samuel,
>>
>> Maybe the intention here was to have "const char * const" as in constant
>> pointer to constant data?
>
>
> Hi,
>
> Yes, maybe?
>
Yes, that was the intend.

Either way - as-is or changed to "const char * const" patch is
Reviewed-by; Emil Velikov <emil.l.velikov at gmail.com>

-Emil


More information about the mesa-dev mailing list