filter/source/xsltfilter/LibXSLTTransformer.cxx | 16 +------- helpcompiler/source/HelpCompiler.cxx | 16 +------- vcl/unx/generic/printer/cupsmgr.cxx | 45 +++++------------------- xmlsecurity/source/xmlsec/saxhelper.cxx | 16 +------- 4 files changed, 16 insertions(+), 77 deletions(-)
New commits: commit 3502484d53d0fdb8868f9bdfd35da99616451614 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Feb 25 08:48:08 2024 +0600 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Feb 25 05:20:41 2024 +0100 Use SAL_WNODEPRECATED_DECLARATIONS_(PUSH|POP) Change-Id: I2810d22e8f5e1c81647b9e9b15519de65939630a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163895 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx index a037a2ccfeb9..82f74a695e84 100644 --- a/filter/source/xsltfilter/LibXSLTTransformer.cxx +++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx @@ -504,21 +504,9 @@ namespace XSLT params = args; } -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4996) -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH xmlSubstituteEntitiesDefault(0); -#if defined(_MSC_VER) -#pragma warning(pop) -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP m_parameters.clear(); for (const Any& p : params) diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx index e874ed94b58f..20f4309c478d 100644 --- a/helpcompiler/source/HelpCompiler.cxx +++ b/helpcompiler/source/HelpCompiler.cxx @@ -39,21 +39,9 @@ HelpCompiler::HelpCompiler(StreamTable &in_streamTable, fs::path in_inputFile, src(std::move(in_src)), zipdir(std::move(in_zipdir)), module(std::move(in_module)), lang(std::move(in_lang)), resCompactStylesheet(std::move(in_resCompactStylesheet)), resEmbStylesheet(std::move(in_resEmbStylesheet)), bExtensionMode( in_bExtensionMode ) { -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4996) -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH xmlKeepBlanksDefaultValue = 0; -#if defined(_MSC_VER) -#pragma warning(pop) -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP char* os = getenv("OS"); if (os) { diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 1529e7ae080e..4f8a4e06f43e 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -88,15 +88,10 @@ struct GetPPDAttribs { // This CUPS method is not at all thread-safe we need // to dup the pointer to a static buffer it returns ASAP -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH const char* pResult = cupsGetPPD(m_aParameter.getStr()); OString aResult = pResult ? OString(pResult) : OString(); -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP MutexGuard aGuard( *m_pSyncMutex ); m_aResult = std::move(aResult); m_aCondition.set(); @@ -229,10 +224,7 @@ void CUPSManager::runDests() // n#722902 - do a fast-failing check for cups working *at all* first http_t* p_http; -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH if( (p_http=httpConnectEncrypt( cupsServer(), ippPort(), @@ -249,9 +241,7 @@ void CUPSManager::runDests() SAL_INFO("vcl.unx.print", "finished cupsGetDests"); httpClose(p_http); -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP } static void SetIfCustomOption(PPDContext& rContext, const cups_option_t& rOption, rtl_TextEncoding aEncoding) @@ -479,14 +469,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) rtl_TextEncoding aEncoding = osl_getThreadTextEncoding(); OUString aFileName( OStringToOUString( aPPDFile, aEncoding ) ); // update the printer info with context information -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH ppd_file_t* pPPD = ppdOpenFile( aPPDFile.getStr() ); -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP if( pPPD ) { // create the new parser @@ -494,14 +479,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) pCUPSParser->m_aFile = rPrinter; pNewParser = pCUPSParser; -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH /*int nConflicts =*/ cupsMarkOptions( pPPD, pDest->num_options, pDest->options ); -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP SAL_INFO("vcl.unx.print", "processing the following options for printer " << pDest->name << " (instance " << (pDest->instance == nullptr ? "null" : pDest->instance) << "):"); for( int k = 0; k < pDest->num_options; k++ ) SAL_INFO("vcl.unx.print", @@ -526,14 +506,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter ) rInfo.m_aContext = rContext; // clean up the mess -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH ppdClose( pPPD ); -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP } else diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index 0d395848941d..fd0785c85a11 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -118,24 +118,12 @@ SAXHelper::SAXHelper( ) * compile error: * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS ; */ -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4996) -#endif +SAL_WNODEPRECATED_DECLARATIONS_PUSH xmlSubstituteEntitiesDefault(0) ; #ifndef XMLSEC_NO_XSLT xmlIndentTreeOutput = 1 ; #endif /* XMLSEC_NO_XSLT */ -#if defined(_MSC_VER) -#pragma warning(pop) -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +SAL_WNODEPRECATED_DECLARATIONS_POP m_pParserCtxt = xmlNewParserCtxt() ;