diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-01-27 00:33:42 -0800 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-01-27 00:33:42 -0800 |
commit | 7de6c0f28186824ec04a33703ec079ed451c437d (patch) | |
tree | 9b6a14f027d32c605d002335c3a827db203ed80f | |
parent | cdfe236931ef3fd06adac0fdf6df49baa39ff35e (diff) | |
download | libusb-7de6c0f28186824ec04a33703ec079ed451c437d.tar.gz |
Windows: Fix compilation warnings when logging is disabled
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r-- | libusb/os/windows_usbdk.c | 6 | ||||
-rw-r--r-- | libusb/os/windows_winusb.c | 6 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/libusb/os/windows_usbdk.c b/libusb/os/windows_usbdk.c index c4cb183..9abb83e 100644 --- a/libusb/os/windows_usbdk.c +++ b/libusb/os/windows_usbdk.c @@ -115,8 +115,7 @@ static FARPROC get_usbdk_proc_addr(struct libusb_context *ctx, LPCSTR api_name) FARPROC api_ptr = GetProcAddress(usbdk_helper.module, api_name); if (api_ptr == NULL) { - DWORD err = GetLastError(); - usbi_err(ctx, "UsbDkHelper API %s not found, error %d", api_name, err); + usbi_err(ctx, "UsbDkHelper API %s not found, error %d", api_name, GetLastError()); } return api_ptr; @@ -131,8 +130,7 @@ static int load_usbdk_helper_dll(struct libusb_context *ctx) { usbdk_helper.module = LoadLibraryA("UsbDkHelper"); if (usbdk_helper.module == NULL) { - DWORD err = GetLastError(); - usbi_err(ctx, "Failed to load UsbDkHelper.dll, error %d", err); + usbi_err(ctx, "Failed to load UsbDkHelper.dll, error %d", GetLastError()); return LIBUSB_ERROR_NOT_FOUND; } diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c index 0488e8e..c6afb14 100644 --- a/libusb/os/windows_winusb.c +++ b/libusb/os/windows_winusb.c @@ -1312,7 +1312,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered for (pass = 0; ((pass < nb_guids) && (r == LIBUSB_SUCCESS)); pass++) { //#define ENUM_DEBUG -#ifdef ENUM_DEBUG +#if defined(ENABLE_LOGGING) && defined(ENUM_DEBUG) const char *passname[] = { "HCD", "HUB", "GEN", "DEV", "HID", "EXT" }; usbi_dbg("#### PROCESSING %ss %s", passname[(pass <= HID_PASS) ? pass : (HID_PASS + 1)], (pass != GEN_PASS) ? guid_to_string(guid[pass]) : ""); @@ -3409,8 +3409,10 @@ static int hid_open(int sub_api, struct libusb_device_handle *dev_handle) int i, j; // report IDs handling ULONG size[3]; - const char *type[3] = {"input", "output", "feature"}; int nb_ids[2]; // zero and nonzero report IDs +#if defined(ENABLE_LOGGING) + const char *type[3] = {"input", "output", "feature"}; +#endif CHECK_HID_AVAILABLE; diff --git a/libusb/version_nano.h b/libusb/version_nano.h index e5b4908..dfcc7c5 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11036 +#define LIBUSB_NANO 11037 |