From af407286ba2fd346755297e56e365d84b98090d5 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 19 Sep 2011 13:59:46 +0100 Subject: [PATCH] Windows: fix 'windows_error_str' defined but not used when not logging --- libusb/os/windows_usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 5e7beb6..89dc10d 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -140,6 +140,7 @@ static char* guid_to_string(const GUID* guid) * Converts a windows error to human readable string * uses retval as errorcode, or, if 0, use GetLastError() */ +#if defined(ENABLE_LOGGING) static char *windows_error_str(uint32_t retval) { static char err_string[ERR_BUFFER_SIZE]; @@ -170,6 +171,7 @@ static char err_string[ERR_BUFFER_SIZE]; } return err_string; } +#endif /* * Sanitize Microsoft's paths: convert to uppercase, add prefix and fix backslashes. -- 2.7.4