On Fri, Jun 15, 2012 at 12:22 PM, Pete Batard <p...@akeo.ie> wrote:

> On 2012.06.15 19:56, Orin Eman wrote:
> > I compiled at warning level 4 with Visual Studio 2010.  There is a lot
> > of noise...
>
> Good point.
>
> I don't think I recompiled at level 4 since last time we tried it in
> libusb-devel, which was probably more than a year ago.
> I have now added this item as another task for for the 1.0.13 milestone.
>
> > For future releases, you might want to look into this one :
> >
> >
> 1>c:\projects\isync\ultrasyncii\libusbx-1.0.12\libusb\os\windows_usb.c(1346):
> > warning C4701: potentially uninitialized local variable 'dev_info_data'
> used
> >
> > I think it's a false alarm.
>
> Will look into that, as well as the disabling of 4200 and the remaining
> ones. I've become quite fond of warning hunting lately... ;)
>


I noticed :)

I like to at least understand all level 4 warnings, even if I don't make
them go away and simply disable them.

Now the C++ compiler doesn't like the libusb_version structure:

1>c:\projects\isync\ultrasyncii\libusbx-1.0.12\libusb\libusb.h(663):
warning C4510: 'libusb_version' : default constructor could not be generated
1>
c:\projects\isync\ultrasyncii\libusbx-1.0.12\libusb\libusb.h(645) : see
declaration of 'libusb_version'
1>c:\projects\isync\ultrasyncii\libusbx-1.0.12\libusb\libusb.h(663):
warning C4512: 'libusb_version' : assignment operator could not be generated
1>
c:\projects\isync\ultrasyncii\libusbx-1.0.12\libusb\libusb.h(645) : see
declaration of 'libusb_version'


Simplest solution is to remove const from all the members.  It's only ever
used as a const struct:

const struct libusb_version * LIBUSB_CALL libusb_get_version(void);

so you'd have to cast that const away to modify a member anyway.

Orin.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to