-Werror,-Wdeprecated-declarations (sprintf, macOS 13 SDK): desktop

Change-Id: I438acf8e63a5d855bb19daee07af0f92b4b609a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142323
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2022-11-05 15:56:09 +01:00
parent 34cecc1f9c
commit ccce14bcce

View file

@ -91,7 +91,9 @@ namespace desktop {
time_t t = time(nullptr);
for (int i = 0; i<nIdBytes; i++) {
int tmpByte = comphelper::rng::uniform_int_distribution(0, 0xFF);
SAL_WNODEPRECATED_DECLARATIONS_PUSH // sprintf (macOS 13 SDK)
sprintf( tmpId+i*2, "%02X", tmpByte );
SAL_WNODEPRECATED_DECLARATIONS_POP
}
tmpId[nIdBytes*2]=0x00;
m_aId = OUString::createFromAscii( tmpId );