[Libreoffice-commits] core.git: sal/osl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 8 07:14:01 UTC 2018


 sal/osl/w32/security.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit ba5670b262b46016011fc7b4ca33c90cd5a1fd6e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Sep 7 15:54:36 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Sep 8 09:13:40 2018 +0200

    -Werror,-Wformat (clang-cl)
    
    ...%d vs. DWORD aka unsigned long, but no need for sprintf anyway
    
    Change-Id: I7e97ada40abf7785a0678c76c76b547d6571f497
    Reviewed-on: https://gerrit.libreoffice.org/60160
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx
index c70ad92f2931..2082301d2156 100644
--- a/sal/osl/w32/security.cxx
+++ b/sal/osl/w32/security.cxx
@@ -318,10 +318,9 @@ sal_Bool SAL_CALL osl_getUserIdent(oslSecurity Security, rtl_uString **strIdent)
                 else
                 {
                     const DWORD dwError = GetLastError();
-                    char sBuf[100];
-                    sprintf(sBuf, "ConvertSidToStringSidW failed. GetLastError returned: %d",
-                            dwError);
-                    SAL_WARN("sal.osl", sBuf);
+                    SAL_WARN(
+                        "sal.osl",
+                        "ConvertSidToStringSidW failed. GetLastError returned: " << dwError);
                 }
 
                 free(pInfoBuffer);


More information about the Libreoffice-commits mailing list