[Mesa-dev] [PATCH] glsl: use ptrdiff_t cast to silence g++ sign warning
Brian Paul
brianp at vmware.com
Mon Sep 22 11:55:35 PDT 2014
g++ 4.8.2 warns on this.
-Brian
On 09/22/2014 12:41 PM, Ian Romanick wrote:
> This seems fine. But I don't get a warning here, and that seems a
> little odd. I'm a pretty old GCC... 4.7.2. What are you on?
>
> Either way, this patch is
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
> On 09/22/2014 08:44 AM, Brian Paul wrote:
>> ---
>> src/glsl/link_uniforms.cpp | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
>> index 258d279..a6683a0 100644
>> --- a/src/glsl/link_uniforms.cpp
>> +++ b/src/glsl/link_uniforms.cpp
>> @@ -749,7 +749,7 @@ link_update_uniform_buffer_variables(struct gl_shader *shader)
>> if (end == NULL)
>> continue;
>>
>> - if (l != (end - begin))
>> + if ((ptrdiff_t) l != (end - begin))
>> continue;
>>
>> if (strncmp(var->name, begin, l) == 0) {
>>
>
More information about the mesa-dev
mailing list