aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2020-11-27 18:42:52 -0800
committerChris Dickens <christopher.a.dickens@gmail.com>2020-11-27 19:21:24 -0800
commit0e6161d3b61f21936077624a51d5222f84c52785 (patch)
treef883b2c453dab2619b9996e255ab02f095dab3c4
parenta2f1e2d5fd4d6bd0e3d918de8e7fd1e90c01eace (diff)
downloadlibusb-0e6161d3b61f21936077624a51d5222f84c52785.tar.gz
Windows: Fix a few more benign compiler warnings
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r--libusb/os/windows_common.c2
-rw-r--r--libusb/os/windows_winusb.c3
-rw-r--r--libusb/version_nano.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/libusb/os/windows_common.c b/libusb/os/windows_common.c
index f25c340..119ed49 100644
--- a/libusb/os/windows_common.c
+++ b/libusb/os/windows_common.c
@@ -114,7 +114,7 @@ HMODULE load_system_library(struct libusb_context *ctx, const char *name)
filename_start = library_path + length;
// Append '\' + name + ".dll" + NUL
- length += 1 + strlen(name) + 4 + 1;
+ length += 1 + (UINT)strlen(name) + 4 + 1;
if (length >= (UINT)sizeof(library_path)) {
usbi_err(ctx, "program assertion failed - library path buffer overflow");
return NULL;
diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c
index 7d47323..f291b8e 100644
--- a/libusb/os/windows_winusb.c
+++ b/libusb/os/windows_winusb.c
@@ -994,6 +994,9 @@ make_descriptors:
config_desc_length = ROOT_HUB_FS_CONFIG_DESC_LENGTH;
ep_interval = 0xff; // 255ms
break;
+ default: // Impossible, buts keeps compiler happy
+ usbi_err(ctx, "program assertion failed - unknown root hub speed");
+ return LIBUSB_ERROR_INVALID_PARAM;
}
if (speed >= LIBUSB_SPEED_SUPER) {
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 18701f1..411b5f9 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11579
+#define LIBUSB_NANO 11580