From: Alain Spineux Date: Thu, 2 Feb 2023 13:32:54 +0000 (+0100) Subject: win32: fix HRESULT constant mismatch between signed and unsigned X-Git-Tag: Beta-15.0.0~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38fd8820752f9fc64b2dd10ee054c4a14dac05fd;p=thirdparty%2Fbacula.git win32: fix HRESULT constant mismatch between signed and unsigned - HRESULT is a 32bits signed value - some constant are >= 0x80000000 that are out of the range of a signed 32 - An alternative would be to set the type casting inside the .h file in the depkgs directory - this concern (in 64bits) - VSS_E_INVALID_XML_DOCUMENT - VSS_E_OBJECT_NOT_FOUND - VSS_E_BAD_STATE - VSS_E_WRITER_INFRASTRUCTURE - VSS_E_WRITER_NOT_RESPONDING --- diff --git a/bacula/src/win32/filed/vss_generic.cpp b/bacula/src/win32/filed/vss_generic.cpp index c6db0c3ef..5346555ce 100644 --- a/bacula/src/win32/filed/vss_generic.cpp +++ b/bacula/src/win32/filed/vss_generic.cpp @@ -115,16 +115,16 @@ static void JmsgVssApiStatus(JCR *jcr, int msg_status, HRESULT hr, const char *a case E_ACCESSDENIED: errmsg = "The caller does not have sufficient backup privileges or is not an administrator."; break; - case VSS_E_INVALID_XML_DOCUMENT: + case ((HRESULT)VSS_E_INVALID_XML_DOCUMENT): errmsg = "The XML document is not valid."; break; - case VSS_E_OBJECT_NOT_FOUND: + case ((HRESULT)VSS_E_OBJECT_NOT_FOUND): errmsg = "The specified file does not exist."; break; - case VSS_E_BAD_STATE: + case ((HRESULT)VSS_E_BAD_STATE): errmsg = "Object is not initialized; called during restore or not called in correct sequence."; break; - case VSS_E_WRITER_INFRASTRUCTURE: + case ((HRESULT)VSS_E_WRITER_INFRASTRUCTURE): errmsg = "The writer infrastructure is not operating properly. Check that the Event Service and VSS have been started, and check for errors associated with those services in the error log."; break; case VSS_S_ASYNC_CANCELLED: