Fixed various trivial cppcheck 1.80 warnings
authorSean McBride <sean@rogue-research.com>
Thu, 28 Dec 2017 04:53:27 +0000 (23:53 -0500)
committerChris Dickens <christopher.a.dickens@gmail.com>
Fri, 29 Dec 2017 06:40:30 +0000 (22:40 -0800)
commit0b3d4c68d87a4ffda2a4e0ff86983f69599048ce
tree30df5e745d05b3628ab37021df0ebb8d730ba62b
parentc1d8c8d654fbb30f420ce273a41f954342f47174
Fixed various trivial cppcheck 1.80 warnings

Specifically:

redundantAssignment,examples/dpfp.c:422,style,Variable 'r' is reassigned a value before the old one has been used.
redundantAssignment,libusb/os/threads_posix.c:64,style,Variable 'ret' is reassigned a value before the old one has been used.
unreadVariable,libusb/os/netbsd_usb.c:217,style,Variable 'hpriv' is assigned a value that is never used.
unreadVariable,libusb/os/netbsd_usb.c:235,style,Variable 'hpriv' is assigned a value that is never used.
unreadVariable,libusb/os/openbsd_usb.c:251,style,Variable 'hpriv' is assigned a value that is never used.
unreadVariable,libusb/os/openbsd_usb.c:275,style,Variable 'hpriv' is assigned a value that is never used.
unsignedLessThanZero,libusb/os/windows_winusb.c:259,style,Checking if unsigned variable '_index' is less than zero.
unsignedLessThanZero,libusb/os/windows_winusb.c:298,style,Checking if unsigned variable '_index' is less than zero.
unsignedLessThanZero,libusb/os/windows_winusb.c:367,style,Checking if unsigned variable '_index' is less than zero.
invalidPrintfArgType_sint,examples/xusb.c:534,warning,%d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
examples/dpfp.c
examples/xusb.c
libusb/os/netbsd_usb.c
libusb/os/openbsd_usb.c
libusb/os/threads_posix.c
libusb/os/windows_winusb.c
libusb/version_nano.h