Steve Hay wrote: > Line 544 in pad.c > > if (off <= PL_comppad_name_floor) > > causes a signed/unsigned mismatch on Win32 using VC++. > > off is a PADOFFSET (an unsigned type), while PL_comppad_name_floor is an > I32 (a signed type). > > Which is the correct fix? This > > if ((I32)off <= PL_comppad_name_floor) > > or this > > if (off <= (PADOFFSET)PL_comppad_name_floor) > > ?
A few lines higher, you have : /* XXX DAPM - why the (I32) cast - shouldn't we ensure they're the same * type ? */ for (off = top; (I32)off > PL_comppad_name_floor; off--) { off is a PADOFFSET, which means unsigned integer. however the NOT_IN_PAD constant values ((PADOFFSET) -1). Regarding this, casting to I32 is the right fix.