diff options
author | Pete Batard <pbatard@gmail.com> | 2010-08-17 13:40:23 +0100 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-08-17 13:40:23 +0100 |
commit | bff90e0aa9d0ace99d16ebf97ec72a50c8461486 (patch) | |
tree | 41ac12c6eec37a8887c55c970614b8262a8f5bb6 | |
parent | ebe4dbd2ef005621e539df724b61a6527f21a64b (diff) | |
download | libusb-bff90e0aa9d0ace99d16ebf97ec72a50c8461486.tar.gz |
fixed errcode shadow warning in MinGW-w64 (windows backend)pbr296
-rw-r--r-- | libusb/os/windows_usb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index a3c33f9..1e9e99b 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -217,23 +217,23 @@ static char *windows_error_str(uint32_t retval) static char err_string[ERR_BUFFER_SIZE]; DWORD size; - uint32_t errcode, format_errcode; + uint32_t error_code, format_error; - errcode = retval?retval:GetLastError(); + error_code = retval?retval:GetLastError(); - safe_sprintf(err_string, ERR_BUFFER_SIZE, "[%d] ", errcode); + safe_sprintf(err_string, ERR_BUFFER_SIZE, "[%d] ", error_code); - size = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, errcode, + size = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &err_string[safe_strlen(err_string)], ERR_BUFFER_SIZE, NULL); if (size == 0) { - format_errcode = GetLastError(); - if (format_errcode) + format_error = GetLastError(); + if (format_error) safe_sprintf(err_string, ERR_BUFFER_SIZE, - "Windows error code %u (FormatMessage error code %u)", errcode, format_errcode); + "Windows error code %u (FormatMessage error code %u)", error_code, format_error); else - safe_sprintf(err_string, ERR_BUFFER_SIZE, "Unknown error code %u", errcode); + safe_sprintf(err_string, ERR_BUFFER_SIZE, "Unknown error code %u", error_code); } return err_string; } |