Hi,Noticed a warning for this code in firmware/usb.c, line 557 (as of r31578):status = (status == USB_INSERTED) ? : USB_EXTRACTED;According to the gcc manual (section 5.7), the expression "x ? : y" (a gcc extension) has the value x if x is nonzero, otherwise z. So, status is set to "true" or "USB_EXTRACTED". In this case, true happens to have the same value as USB_INSERTED... Is that what was intended here?--Magnus
Yes. It's just like "status = (status == USB_INSERTED) ? status :
USB_EXTRACTED;"
- usb.c warning Magnus Holmgren
- Re: usb.c warning Michael Sevakis
- Re: usb.c warning Michael Sevakis
- Re: usb.c warning Frank Gevaerts
- Re: usb.c warning Michael Sevakis
- Re: usb.c warning Frank Gevaerts
- Re: usb.c warning Michael Sevakis