[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/unx

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Tue May 7 10:31:19 UTC 2019


 vcl/unx/generic/printer/cupsmgr.cxx |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

New commits:
commit 11fc802f001187ab5ba368832d7246c397b98682
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Nov 28 20:39:43 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 7 12:30:45 2019 +0200

    band-aid: deprecated-declarations related to cups
    
    Change-Id: I07438840fc1c3cc8e70559d44954be0c49531525
    Reviewed-on: https://gerrit.libreoffice.org/64191
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit e9e49fceac43476d1233ee8106cba5f4831771b9)
    Reviewed-on: https://gerrit.libreoffice.org/71896

diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 630e39437119..dafe671f8b65 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -81,7 +81,14 @@ 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
         OString aResult = cupsGetPPD(m_aParameter.getStr());
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
         MutexGuard aGuard( *m_pSyncMutex );
         m_aResult = aResult;
         m_aCondition.set();
@@ -214,6 +221,10 @@ 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
     if( (p_http=httpConnectEncrypt(
              cupsServer(),
              ippPort(),
@@ -230,6 +241,9 @@ void CUPSManager::runDests()
 
         httpClose(p_http);
     }
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
 }
 
 void CUPSManager::initialize()
@@ -439,7 +453,14 @@ 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
                     ppd_file_t* pPPD = ppdOpenFile( aPPDFile.getStr() );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
                     if( pPPD )
                     {
                         // create the new parser
@@ -447,7 +468,14 @@ 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
                         /*int nConflicts =*/ cupsMarkOptions( pPPD, pDest->num_options, pDest->options );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
                         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",
@@ -468,7 +496,15 @@ 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
                         ppdClose( pPPD );
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
                     }
                     else
                         SAL_INFO("vcl.unx.print", "ppdOpenFile failed, falling back to generic driver");


More information about the Libreoffice-commits mailing list