summaryrefslogtreecommitdiff
path: root/libusb/os/windows_usbdk.c
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2016-01-27 00:33:42 -0800
committerChris Dickens <christopher.a.dickens@gmail.com>2016-01-27 00:33:42 -0800
commit7de6c0f28186824ec04a33703ec079ed451c437d (patch)
tree9b6a14f027d32c605d002335c3a827db203ed80f /libusb/os/windows_usbdk.c
parentcdfe236931ef3fd06adac0fdf6df49baa39ff35e (diff)
downloadlibusb-7de6c0f28186824ec04a33703ec079ed451c437d.tar.gz
Windows: Fix compilation warnings when logging is disabled
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/windows_usbdk.c')
-rw-r--r--libusb/os/windows_usbdk.c6
1 files changed, 2 insertions, 4 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;
}