On Sat 07/04/2018 16:52, Rafael Sadowski wrote:
> On Sat Apr 07, 2018 at 03:15:53PM +0200, Björn Ketelaars wrote:
> > Diff below fixes p7zip (clang 6.0).
> > 
> > OK?
> > 
> > 
> > Index: patches/patch-CPP_Windows_ErrorMsg_cpp
> > ===================================================================
> > RCS file: patches/patch-CPP_Windows_ErrorMsg_cpp
> > diff -N patches/patch-CPP_Windows_ErrorMsg_cpp
> > --- /dev/null       1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-CPP_Windows_ErrorMsg_cpp  7 Apr 2018 13:11:53 -0000
> > @@ -0,0 +1,30 @@
> > +$OpenBSD$
> > +
> > +Index: CPP/Windows/ErrorMsg.cpp
> > +--- CPP/Windows/ErrorMsg.cpp.orig
> > ++++ CPP/Windows/ErrorMsg.cpp
> > +@@ -14,15 +14,15 @@ UString MyFormatMessage(DWORD errorCode)
> > +   AString msg;
> > + 
> > +   switch(errorCode) {
> 
> Please use only:
> 
> switch(static_cast<int>(errorCode))
> 
> ok to that.

...which results is a much smaller additional patch. Thanks!

OK?


Index: patches/patch-CPP_Windows_ErrorMsg_cpp
===================================================================
RCS file: patches/patch-CPP_Windows_ErrorMsg_cpp
diff -N patches/patch-CPP_Windows_ErrorMsg_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-CPP_Windows_ErrorMsg_cpp      7 Apr 2018 15:25:11 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: CPP/Windows/ErrorMsg.cpp
+--- CPP/Windows/ErrorMsg.cpp.orig
++++ CPP/Windows/ErrorMsg.cpp
+@@ -13,7 +13,7 @@ UString MyFormatMessage(DWORD errorCode)
+   const char * txt = 0;
+   AString msg;
+ 
+-  switch(errorCode) {
++  switch(static_cast<int>(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 ;

Reply via email to