Hi Jie, On 2013.01.11 13:42, Jie Zhang wrote: >> Move #pragma from msvc/config.h to libusb/libusb.h ? >> I am against this change. The #pragma is for Windows so should be in a >> Windows only file. >> > If msvc/config.h is installed and included automatically in libusb.h > when compiled by MSVC, I will have no problem. But we only install > libusb.h. So every user file of libusb.h needs to add the pragma to > suppress the warning with MSVC.
My opinion is that it should really be to each developer to decide whether they want to suppress warnings, and we shouldn't force their suppression in a header. I will assume that the warning is there for a legitimate reason and therefore that some libusbx users do want to be alerted for a nonstandard extension used. I think I can see a scenario for it if they're going to interop with a library or app where 1 sized arrays were used instead of zero sized arrays, in which case they may get very bad surprises when using sizeof on the structs they going to interchange, whereas this is probably what the warning is meant to alert against. As such I will vote for keeping the disabling of any warnings as an internal affair, as it's really a set of preferences that should only apply to the code that is directly under our control, rather than something we also want to see apply onto code that isn't. Or in other words, better keep our users safe, yet possibly annoyed, with an extra warning than sorry without. Regards, /Pete ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel