From 0e6161d3b61f21936077624a51d5222f84c52785 Mon Sep 17 00:00:00 2001 From: Chris Dickens Date: Fri, 27 Nov 2020 18:42:52 -0800 Subject: [PATCH] Windows: Fix a few more benign compiler warnings Signed-off-by: Chris Dickens --- libusb/os/windows_common.c | 2 +- libusb/os/windows_winusb.c | 3 +++ libusb/version_nano.h | 2 +- 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 -- 2.7.4