connectivity/source/drivers/file/FDatabaseMetaData.cxx |    2 ++
 connectivity/source/manager/mdrivermanager.cxx         |   15 ++++++---------
 sc/source/core/data/documen3.cxx                       |    6 +++++-
 solenv/bin/native-code.py                              |    1 +
 4 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit fa5db38ae5bbe9abfd41b6765074ca1200b8def2
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Fri Dec 24 02:37:33 2021 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Sat Dec 25 17:04:13 2021 +0100

    oss-fuzz: fix some compiler warnings
    
    Some unused functions and variables and many missing
    HAVE_FEATURE_NSS warnings, because the native-code.py
    stubs were missing the config_crypto.h header.
    
    Change-Id: I88ff7d8f96e7382027a21f205db982fd797bd6af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127392
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx 
b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index f6480744e665..6d0a4f2fe0b1 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -73,6 +73,7 @@ Reference< XResultSet > SAL_CALL 
ODatabaseMetaData::getColumns(
 
 namespace
 {
+#if !ENABLE_FUZZERS
     sal_Int16 isCaseSensitiveParentFolder( const OUString& _rFolderOrDoc, 
std::u16string_view _rDocName )
     {
         sal_Int16 nIsCS = 1;
@@ -151,6 +152,7 @@ namespace
 
         return nIsCS;
     }
+#endif
 }
 
 
diff --git a/connectivity/source/manager/mdrivermanager.cxx 
b/connectivity/source/manager/mdrivermanager.cxx
index 390b6da13e27..c605573b703e 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -102,8 +102,8 @@ Any SAL_CALL ODriverEnumeration::nextElement(  )
     return makeAny( *m_aPos++ );
 }
 
-    namespace {
-
+namespace
+{
     /// an STL functor which ensures that a SdbcDriver described by a 
DriverAccess is loaded
     struct EnsureDriver
     {
@@ -174,9 +174,8 @@ Any SAL_CALL ODriverEnumeration::nextElement(  )
         }
     };
 
-    }
-
-    static sal_Int32 lcl_getDriverPrecedence( const 
Reference<XComponentContext>& _rContext, Sequence< OUString >& _rPrecedence )
+#if !ENABLE_FUZZERS
+    sal_Int32 lcl_getDriverPrecedence( const Reference<XComponentContext>& 
_rContext, Sequence< OUString >& _rPrecedence )
     {
         _rPrecedence.realloc( 0 );
         try
@@ -210,8 +209,7 @@ Any SAL_CALL ODriverEnumeration::nextElement(  )
 
         return _rPrecedence.getLength();
     }
-
-    namespace {
+#endif
 
     /// an STL algorithm compatible predicate comparing two DriverAccess 
instances by their implementation names
     struct CompareDriverAccessByName
@@ -234,8 +232,7 @@ Any SAL_CALL ODriverEnumeration::nextElement(  )
             return lhs.sImplementationName == m_sImplName;
         }
     };
-
-    }
+}
 
 OSDBCDriverManager::OSDBCDriverManager( const Reference< XComponentContext >& 
_rxContext )
     :OSDBCDriverManager_Base(m_aMutex)
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 163c374b6406..35f1f936392e 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -575,8 +575,11 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const 
OUString& aDocTab,
     }
     rTab = 0;
 #if ENABLE_FUZZERS
+    (void)aDocTab;
+    (void)aFileName;
+    (void)aTabName;
     return false;
-#endif
+#else
     OUString  aFilterName; // Is filled by the Loader
     OUString  aOptions; // Filter options
     sal_uInt32 nLinkCnt = pExtDocOptions ? 
pExtDocOptions->GetDocSettings().mnLinkCnt : 0;
@@ -618,6 +621,7 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const 
OUString& aDocTab,
             pBindings->Invalidate( SID_LINKS );
     }
     return true;
+#endif
 }
 
 ScExternalRefManager* ScDocument::GetExternalRefManager() const
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 7abb6c97ac4d..88d53d320602 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -861,6 +861,7 @@ print ("""/*
  * File generated by solenv/bin/native-code.py
  */
 
+#include <config_crypto.h>
 #include <config_features.h>
 #include <config_fuzzers.h>
 #include <config_gpgme.h>

Reply via email to