Windows: fix 'windows_error_str' defined but not used when not logging
authorPete Batard <pete@akeo.ie>
Mon, 19 Sep 2011 12:59:46 +0000 (13:59 +0100)
committerPeter Stuge <peter@stuge.se>
Mon, 17 Oct 2011 14:25:51 +0000 (16:25 +0200)
libusb/os/windows_usb.c

index 5e7beb6..89dc10d 100644 (file)
@@ -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.