diff options
author | Michael Plante <michael.plante@gmail.com> | 2011-12-23 16:50:21 -0600 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2012-02-08 14:46:17 +0100 |
commit | ca09754471acba9a22fe8fc09170e5660d1d5c5d (patch) | |
tree | 29ad95908726589fee7bf690d397f67f80955c17 | |
parent | 8e15adcb0089882d10269ab77d35e193770ab90e (diff) | |
download | libusb-ca09754471acba9a22fe8fc09170e5660d1d5c5d.tar.gz |
Windows: guid_to_string() is only discarded when macro-usbi_dbg used
* usbi_dbg encloses all references to guid_to_string
* MinGW/cygwin warn about an unused function, so the #if
squelches this warning
* MSVC6 uses a variadic function form of usbi_dbg instead
of a macro, so the compiler still "sees" guid_to_string
and it therefore needs to always be defined for MSVC6,
even if it's only a stub.
* So we define it if usbi_dbg is used OR if MSVC6 is used.
Signed-off-by: Michael Plante <michael.plante@gmail.com>
-rw-r--r-- | libusb/os/windows_usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 68216db..dcc7e7f 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -122,7 +122,7 @@ static inline BOOLEAN guid_eq(const GUID *guid1, const GUID *guid2) { return false; } -#if defined(ENABLE_DEBUG_LOGGING) +#if defined(ENABLE_DEBUG_LOGGING) || (defined(_MSC_VER) && _MSC_VER <= 1200) static char* guid_to_string(const GUID* guid) { static char guid_string[MAX_GUID_STRING_LENGTH]; |