Hans Petter Selasky <hselasky_at_c2i.net> 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 isn't. 3) the pointer magic you do in (for instance) libusb20_me_encode() and libusb20_me_decode() won't work on strict-alignment platforms. DES -- Dag-Erling Smørgrav - des_at_des.noReceived on Mon Dec 29 2008 - 08:23:47 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:39 UTC