[HarfBuzz] Clang warnings while compiling HB trunk

Jonathan Kew jfkthame at googlemail.com
Tue Oct 22 01:17:45 PDT 2013


On 22/10/13 00:20, Behdad Esfahbod wrote:
> On 13-10-20 01:44 PM, Shriramana Sharma wrote:
>> Hello. I'm running Clang 3.2 on Kubuntu Saucy.
>
> Generally these warnings seem to be Ok.

Not entirely. The warning about OT_CM2 here:

hb-ot-shape-complex-indic.cc:166:27: warning: shift count >= width of 
type [-Wshift-count-overflow]
   return is_one_of (info, CONSONANT_FLAGS);
                           ^~~~~~~~~~~~~~~
hb-ot-shape-complex-indic.cc:162:55: note: expanded from macro 
'CONSONANT_FLAGS'
#define CONSONANT_FLAGS (FLAG (OT_C) | FLAG (OT_Ra) | MEDIAL_FLAGS | 
FLAG (OT_V) | FLAG (OT_NBSP) | FLAG (OT_DOTTEDCIRCLE))
                                                       ^~~~~~~~~~~~
hb-ot-shape-complex-indic.cc:155:38: note: expanded from macro 
'MEDIAL_FLAGS'
#define MEDIAL_FLAGS (FLAG (OT_CM) | FLAG (OT_CM2))
                                      ^~~~~~~~~~~~~
./hb-private.hh:818:19: note: expanded from macro 'FLAG'
#define FLAG(x) (1<<(x))
                   ^ ~~~

(occurs three times) looks legitimate to me; OT_CM2 is currently defined 
as 41, which means it can't be mapped to a position within a 32-bit 
flags word.

The fix would be to rearrange the classes such that the ones we care 
about using as flags are all <= 31.

JK




More information about the HarfBuzz mailing list