blob: d80dcb9c99ee64cdf95c6bd7f6db87ebbdeb7c79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
From 063cd89c047e924b24405737c892fbcbaf51ba6b Mon Sep 17 00:00:00 2001
From: sunguoshuai <sunguoshuai@huawei.com>
Date: Fri, 30 Jul 2021 16:08:30 +0800
Subject: [PATCH] fix build failed with gcc 10
---
CPP/Windows/ErrorMsg.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CPP/Windows/ErrorMsg.cpp b/CPP/Windows/ErrorMsg.cpp
index 99684ae..7949880 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 ;
@@ -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 ;
--
2.30.0
|