tools/source/misc/json_writer.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 422c26ef82e6391071b5c3c03d64d0e5d37c920e
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Thu Jun 8 17:28:42 2023 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Jun 16 17:41:09 2023 +0200

    -Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): tools
    
    (The "clang-format off" in tools/source/misc/json_writer.cxx is necessary
    because otherwise the code between the 
SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP
    macros would be ill-formatted in a way that would trigger 
loplugin:indentation.)
    
    Change-Id: I98af7311e1980829d94aa93f88acf11f0d67d5e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152776
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Patrick Luby <plub...@neooffice.org>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/tools/source/misc/json_writer.cxx 
b/tools/source/misc/json_writer.cxx
index 95210d7e7fa7..865b09d50e6a 100644
--- a/tools/source/misc/json_writer.cxx
+++ b/tools/source/misc/json_writer.cxx
@@ -159,7 +159,12 @@ static bool writeEscapedSequence(sal_uInt32 ch, char*& pos)
     // control characters
     if (ch <= 0x1f)
     {
+        // clang-format off
+        SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
         int written = sprintf(pos, "\\u%.4x", ch);
+        SAL_WNODEPRECATED_DECLARATIONS_POP
+        // clang-format on
+
         if (written > 0)
             pos += written;
         return true;

Reply via email to