[HarfBuzz] Pointer initialization from false

Tom Hacohen tom.hacohen at samsung.com
Mon Sep 10 07:00:58 PDT 2012


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.




More information about the HarfBuzz mailing list