diff options
author | Sean McBride <sean@rogue-research.com> | 2017-12-27 23:53:27 -0500 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2017-12-28 22:40:30 -0800 |
commit | 0b3d4c68d87a4ffda2a4e0ff86983f69599048ce (patch) | |
tree | 30df5e745d05b3628ab37021df0ebb8d730ba62b /libusb/os/netbsd_usb.c | |
parent | c1d8c8d654fbb30f420ce273a41f954342f47174 (diff) | |
download | libusb-0b3d4c68d87a4ffda2a4e0ff86983f69599048ce.tar.gz |
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>
Diffstat (limited to 'libusb/os/netbsd_usb.c')
-rw-r--r-- | libusb/os/netbsd_usb.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libusb/os/netbsd_usb.c b/libusb/os/netbsd_usb.c index 8f9fa36..d9c059a 100644 --- a/libusb/os/netbsd_usb.c +++ b/libusb/os/netbsd_usb.c @@ -214,7 +214,6 @@ error: int netbsd_open(struct libusb_device_handle *handle) { - struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv; struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv; dpriv->fd = open(dpriv->devnode, O_RDWR); @@ -232,7 +231,6 @@ netbsd_open(struct libusb_device_handle *handle) void netbsd_close(struct libusb_device_handle *handle) { - struct handle_priv *hpriv = (struct handle_priv *)handle->os_priv; struct device_priv *dpriv = (struct device_priv *)handle->dev->os_priv; usbi_dbg("close: fd %d", dpriv->fd); |