41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
|
From 1b7d2c73f01b2d2b6a3d2d16840e96e92afdcd61 Mon Sep 17 00:00:00 2001
|
||
|
From: jinfeihan57 <jinfeihan57@gmail.com>
|
||
|
Date: Tue, 9 Jun 2020 16:48:25 +0800
|
||
|
Subject: [PATCH] gix gcc10 compiler error
|
||
|
|
||
|
---
|
||
|
CPP/Windows/ErrorMsg.cpp | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp
|
||
|
index 99684ae..90a7e20 100644
|
||
|
--- a/CPP/Windows/ErrorMsg.cpp
|
||
|
+++ b/CPP/Windows/ErrorMsg.cpp
|
||
|
@@ -13,7 +13,7 @@ UString MyFormatMessage(DWORD errorCode)
|
||
|
const char * txt = 0;
|
||
|
AString msg;
|
||
|
|
||
|
- switch(errorCode) {
|
||
|
+ switch(HRESULT(errorCode)) {
|
||
|
case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
|
||
|
case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
|
||
|
case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
|
||
|
@@ -22,7 +22,7 @@ UString MyFormatMessage(DWORD errorCode)
|
||
|
case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ;
|
||
|
case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ;
|
||
|
case E_INVALIDARG : txt = "E_INVALIDARG"; break ;
|
||
|
- case ERROR_DIRECTORY : txt = "Error Directory"; break ;
|
||
|
+ case ERROR_DIRECTORY : txt = "Error Directory"; break ;
|
||
|
default:
|
||
|
txt = strerror(errorCode);
|
||
|
}
|
||
|
@@ -43,7 +43,7 @@ bool MyFormatMessage(DWORD messageID, CSysString &message)
|
||
|
const char * txt = 0;
|
||
|
AString msg;
|
||
|
|
||
|
- switch(messageID) {
|
||
|
+ switch(HRESULT(messageID)) {
|
||
|
case ERROR_NO_MORE_FILES : txt = "No more files"; break ;
|
||
|
case E_NOTIMPL : txt = "E_NOTIMPL"; break ;
|
||
|
case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ;
|