Re: [Libusbx-devel] Move #pragma warning(disable:4200) from config.h to libusb.h?

2013-01-13 Thread Jie Zhang
Hi Pete, I think the email has become too long to get the discussion on focus. So I'm going to summarize your point and my point. If I understand wrong about your words, please pointing out. Your point: The C4200 warning given by MS compiler implies the using zero length arrays is unsafe beside i

Re: [Libusbx-devel] Move #pragma warning(disable:4200) from config.h to libusb.h?

2013-01-13 Thread Pete Batard
On 2013.01.13 18:17, Jie Zhang wrote: >>> But this warning is introduced by libusb, not by user >> >> Not really. The warning is introduced by the compiler as a result of >> libusbx using zero sized arrays, which may *or may not* be OK with >> regards to what the user is planning to do, to which we

Re: [Libusbx-devel] Move #pragma warning(disable:4200) from config.h to libusb.h?

2013-01-13 Thread Jie Zhang
On Sun, Jan 13, 2013 at 4:47 AM, Ludovic Rousseau wrote: > 2013/1/13 Pete Batard : >>> As I said above, this piece of code is safe. >> >> Can you prove it? > > Some remarks > 1- a zero sized array is illegal in C. It is a GCC extension. See [1] > It's also a MSC extension. > 2- zero sized arrays

Re: [Libusbx-devel] Move #pragma warning(disable:4200) from config.h to libusb.h?

2013-01-13 Thread Jie Zhang
On Sat, Jan 12, 2013 at 6:20 PM, Pete Batard wrote: > On 2013.01.12 03:23, Jie Zhang wrote: >> But this warning is introduced by libusb, not by user > > Not really. The warning is introduced by the compiler as a result of > libusbx using zero sized arrays, which may *or may not* be OK with > regar

Re: [Libusbx-devel] Move #pragma warning(disable:4200) from config.h to libusb.h?

2013-01-13 Thread Ludovic Rousseau
2013/1/13 Pete Batard : >> As I said above, this piece of code is safe. > > Can you prove it? Some remarks 1- a zero sized array is illegal in C. It is a GCC extension. See [1] 2- zero sized arrays are used in libusb/libusbi.h but NOT in the public libusb/libusb.h. So it is internal only. 3- gcc

Re: [Libusbx-devel] What about pull request #59: Fix compiler warnings when building with CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;

2013-01-13 Thread Ludovic Rousseau
2013/1/12 Pete Batard : > Finally, a couple more notes: > - Did you advertise for the pull request on the mailing list (in which > case I probably didn't pay attention to it, so my bad). If not, be > mindful that, alas, we no longer have a notification system for new > github issue, so you should c