[HarfBuzz] Pointer initialization from false

Kenichi Ishibashi (石橋 賢一) bashi at google.com
Mon Sep 10 07:06:57 PDT 2012


Thanks for the quick fix!


On Mon, Sep 10, 2012 at 11:00 PM, Tom Hacohen <tom.hacohen at samsung.com>wrote:

> On 10/09/12 16:57, Behdad Esfahbod wrote:
>
>> On 09/10/2012 09:51 AM, Kenichi Ishibashi wrote:
>>
>>> Hi Behdad,
>>>
>>> The current revision can't compile with clang++ if -Werror option is
>>> specified.
>>>
>>> src/hb-open-type-private.hh:**437:93: error: initialization of pointer
>>> of type
>>> 'OT::GenericArrayOf<OT::**IntType<unsigned short>,
>>> OT::OffsetTo<OT::LigatureSet>
>>>
>>>> *' to null from a constant boolean expression
>>>> [-Werror,-Wbool-conversion]
>>>>
>>>      if (unlikely (!this->allocate_size<Type> (((char *) &obj) + size -
>>> this->head))) return false
>>>
>>> I'd appreciate if you could use NULL instead of false here.
>>>
>>
>> Oops!  Fixed.  Thanks.
>>
>> I wish gcc was more helpful.  One day I will switch to clang.  One day...
>>
>
> At least consider compiling with the clang static analyser so you'll get
> all the errors and warnings clang usually provides with the added bonus of
> static analysing. :)
>
> --
> Tom.
>
>


-- 
Kenichi Ishibashi
bashi at google.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20120910/40bbd5df/attachment.html>


More information about the HarfBuzz mailing list