Hans Petter Selasky <email@example.com> writes:
> LIBUSB20_ADD_BYTES() is a hack to circumvent things like un-constifying and
> making a byte increment to any pointer type. USB descriptors are byte-packed.
> I have tested the macro with several kinds of compilers and none have
> complained yet.
1) if you need to de-constify, your API is broken.
2) just because the compiler doesn't know it's wrong doesn't mean it
3) the pointer magic you do in (for instance) libusb20_me_encode() and
libusb20_me_decode() won't work on strict-alignment platforms.
Dag-Erling Smrgrav - firstname.lastname@example.org