summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-25 08:48:08 +0600
committerThorsten Behrens <thorsten.behrens@allotropia.de>2024-03-02 17:31:10 +0100
commit218dfc968e99ca12ebb710f02064b869b013b685 (patch)
treeedd780152aec60174b43dd1324ee34e2659a1d92
parent169ee1588810b4636d92d8abab4ab3542ec9e1cd (diff)
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.kaganski@collabora.com>
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx16
-rw-r--r--helpcompiler/source/HelpCompiler.cxx16
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx45
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx16
4 files changed, 16 insertions, 77 deletions
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 747bf330c6eb..a6b4a8319fd1 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -494,21 +494,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 (int i = 0; i < params.getLength(); i++)
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index 0436d9efb461..cdfb0fbc37cf 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -44,21 +44,9 @@ HelpCompiler::HelpCompiler(StreamTable &in_streamTable, const fs::path &in_input
src(in_src), zipdir(in_zipdir), module(in_module), lang(in_lang), resCompactStylesheet(in_resCompactStylesheet),
resEmbStylesheet(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 0849d5e84763..ffe53461763b 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -82,14 +82,9 @@ 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
OString aResult = cupsGetPPD(m_aParameter.getStr());
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
MutexGuard aGuard( *m_pSyncMutex );
m_aResult = aResult;
m_aCondition.set();
@@ -222,10 +217,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(),
@@ -242,9 +234,7 @@ void CUPSManager::runDests()
httpClose(p_http);
}
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
}
void CUPSManager::initialize()
@@ -448,14 +438,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
@@ -463,14 +448,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",
@@ -491,14 +471,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 8ae3622c24a4..4f50e4d5c665 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() ;