summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2011-09-19 13:59:46 +0100
committerPeter Stuge <peter@stuge.se>2011-10-17 16:25:51 +0200
commitaf407286ba2fd346755297e56e365d84b98090d5 (patch)
tree4267a94cdf289bf65e0e7dfc616636eca995c646
parentabc3143ba1989a48f62246c2afb0eb4c3c5f7917 (diff)
Windows: fix 'windows_error_str' defined but not used when not logging
-rw-r--r--libusb/os/windows_usb.c2
1 files changed, 2 insertions, 0 deletions
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.