[libxslt/cmake-crypto-win32: 3/3] crypto.c: Silence a compiler warning on Windows




commit fbec07736bd4f8fe969a6ff9a95c2f9946e1d486
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Mar 9 12:51:07 2022 +0800

    crypto.c: Silence a compiler warning on Windows
    
    Cast lpBuffer to a LPSTR, so that we don't get a C4047/C4024 warning for
    type conversion, which normally would raise alarm.

 libexslt/crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libexslt/crypto.c b/libexslt/crypto.c
index a233771a..1cd2b417 100644
--- a/libexslt/crypto.c
+++ b/libexslt/crypto.c
@@ -127,7 +127,7 @@ exsltCryptoCryptoApiReportError (xmlXPathParserContextPtr ctxt,
     FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
                   FORMAT_MESSAGE_FROM_SYSTEM, NULL, dw,
                   MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
-                  &lpMsgBuf, 0, NULL);
+                  (LPSTR)&lpMsgBuf, 0, NULL);
 
     xsltTransformError (xsltXPathGetTransformContext (ctxt), NULL, NULL,
                        "exslt:crypto error (line %d). %s", line,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]