diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-20 00:41:01 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-20 00:41:01 +0000 |
commit | 026db407fcec641fb9d5f4aa7d39c07885973dcd (patch) | |
tree | 6313c3d4697856be9db6b2d9012d2b4a8d3e02b0 /connectivity/source/drivers | |
parent | 6910a725b1267bfbde1fa8674f2c92c46f8f1e50 (diff) |
INTEGRATION: CWS warnings01 (1.2.28); FILE MERGED
2006/01/30 14:18:54 sb 1.2.28.1: #i53898# Made code warning-free.
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r-- | connectivity/source/drivers/kab/KResultSetMetaData.cxx | 38 | ||||
-rw-r--r-- | connectivity/source/drivers/kab/KStatement.cxx | 38 | ||||
-rw-r--r-- | connectivity/source/drivers/kab/kcondition.cxx | 20 |
3 files changed, 54 insertions, 42 deletions
diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx index 0ce5040b7d27..800a1b95342c 100644 --- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx @@ -4,9 +4,9 @@ * * $RCSfile: KResultSetMetaData.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: obo $ $Date: 2005-12-19 16:50:49 $ + * last change: $Author: hr $ $Date: 2006-06-20 01:39:36 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -92,12 +92,12 @@ sal_Int32 SAL_CALL KabResultSetMetaData::getColumnCount() throw(SQLException, Ru return m_aKabFields.size(); } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isCaseSensitive(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isCaseSensitive(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL KabResultSetMetaData::getSchemaName(sal_Int32 column) throw(SQLException, RuntimeException) +::rtl::OUString SAL_CALL KabResultSetMetaData::getSchemaName(sal_Int32) throw(SQLException, RuntimeException) { return ::rtl::OUString(); } @@ -121,79 +121,79 @@ sal_Bool SAL_CALL KabResultSetMetaData::isCaseSensitive(sal_Int32 column) throw( return aName; } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL KabResultSetMetaData::getTableName(sal_Int32 column) throw(SQLException, RuntimeException) +::rtl::OUString SAL_CALL KabResultSetMetaData::getTableName(sal_Int32) throw(SQLException, RuntimeException) { return KabDatabaseMetaData::getAddressBookTableName(); } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL KabResultSetMetaData::getCatalogName(sal_Int32 column) throw(SQLException, RuntimeException) +::rtl::OUString SAL_CALL KabResultSetMetaData::getCatalogName(sal_Int32) throw(SQLException, RuntimeException) { return ::rtl::OUString(); } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnTypeName(sal_Int32 column) throw(SQLException, RuntimeException) +::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnTypeName(sal_Int32) throw(SQLException, RuntimeException) { return ::rtl::OUString(); } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnLabel(sal_Int32 column) throw(SQLException, RuntimeException) +::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnLabel(sal_Int32) throw(SQLException, RuntimeException) { return ::rtl::OUString(); } // ------------------------------------------------------------------------- -::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnServiceName(sal_Int32 column) throw(SQLException, RuntimeException) +::rtl::OUString SAL_CALL KabResultSetMetaData::getColumnServiceName(sal_Int32) throw(SQLException, RuntimeException) { return ::rtl::OUString(); } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isCurrency(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isCurrency(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isAutoIncrement(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isAutoIncrement(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isSigned(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isSigned(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL KabResultSetMetaData::getPrecision(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL KabResultSetMetaData::getPrecision(sal_Int32) throw(SQLException, RuntimeException) { return 0; } // ----------------------------------------------------------------------------- -sal_Int32 SAL_CALL KabResultSetMetaData::getScale(sal_Int32 column) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) +sal_Int32 SAL_CALL KabResultSetMetaData::getScale(sal_Int32) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { return 0; } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL KabResultSetMetaData::isNullable(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL KabResultSetMetaData::isNullable(sal_Int32) throw(SQLException, RuntimeException) { return (sal_Int32) sal_True; // KDE address book currently does not use NULL values. // But it might do it someday } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isSearchable(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isSearchable(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isReadOnly(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isReadOnly(sal_Int32) throw(SQLException, RuntimeException) { return sal_True; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isDefinitelyWritable(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isDefinitelyWritable(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } // ------------------------------------------------------------------------- -sal_Bool SAL_CALL KabResultSetMetaData::isWritable(sal_Int32 column) throw(SQLException, RuntimeException) +sal_Bool SAL_CALL KabResultSetMetaData::isWritable(sal_Int32) throw(SQLException, RuntimeException) { return sal_False; } diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 9ea33f055c32..8c082f026dac 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -4,9 +4,9 @@ * * $RCSfile: KStatement.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: obo $ $Date: 2005-12-19 16:51:20 $ + * last change: $Author: hr $ $Date: 2006-06-20 01:40:03 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -81,11 +81,11 @@ IMPLEMENT_SERVICE_INFO(KabStatement, "com.sun.star.sdbc.drivers.KabStatement", " KabCommonStatement::KabCommonStatement(KabConnection* _pConnection ) : KabCommonStatement_BASE(m_aMutex), OPropertySetHelper(KabCommonStatement_BASE::rBHelper), - rBHelper(KabCommonStatement_BASE::rBHelper), - m_pParseTree(NULL), - m_aSQLIterator(_pConnection->createCatalog()->getTables(), _pConnection->getMetaData(), NULL), m_aParser(_pConnection->getDriver()->getMSFactory()), - m_pConnection(_pConnection) + m_aSQLIterator(_pConnection->createCatalog()->getTables(), _pConnection->getMetaData(), NULL), + m_pParseTree(NULL), + m_pConnection(_pConnection), + rBHelper(KabCommonStatement_BASE::rBHelper) { m_pConnection->acquire(); } @@ -121,6 +121,9 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse // WHERE 0 <> 1 // (might not be correct SQL... don't care, handling anyway) return new KabConditionConstant(pLeft->getTokenValue() != pRight->getTokenValue()); + + default: + break; } } else if (SQL_ISRULE(pLeft, column_ref) && pRight->isToken()) @@ -141,6 +144,9 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse case SQL_NODE_NOTEQUAL: // WHERE Name <> 'Jones' return new KabConditionDifferent(sColumnName, sMatchString); + + default: + break; } } } @@ -214,6 +220,9 @@ KabCondition *KabCommonStatement::analyseWhereClause(const OSQLParseNode *pParse ::dbtools::throwGenericSQLException( ::rtl::OUString::createFromAscii("Syntax error or keyword not recognized."), NULL); + // Unreachable: + OSL_ASSERT(false); + return 0; } // ----------------------------------------------------------------------------- KabOrder *KabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNode) const throw(SQLException) @@ -261,6 +270,9 @@ KabOrder *KabCommonStatement::analyseOrderByClause(const OSQLParseNode *pParseNo ::dbtools::throwGenericSQLException( ::rtl::OUString::createFromAscii("Syntax error or keyword not recognized."), NULL); + // Unreachable: + OSL_ASSERT(false); + return 0; } //------------------------------------------------------------------------------ sal_Bool KabCommonStatement::isTableKnown(KabResultSet *pResult) const @@ -433,7 +445,7 @@ Reference< XConnection > SAL_CALL KabCommonStatement::getConnection( ) throw(SQ return (Reference< XConnection >) m_pConnection; } // ------------------------------------------------------------------------- -sal_Int32 SAL_CALL KabCommonStatement::executeUpdate( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException) +sal_Int32 SAL_CALL KabCommonStatement::executeUpdate( const ::rtl::OUString& ) throw(SQLException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); @@ -485,10 +497,10 @@ void SAL_CALL KabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeE } // ------------------------------------------------------------------------- sal_Bool KabCommonStatement::convertFastPropertyValue( - Any & rConvertedValue, - Any & rOldValue, - sal_Int32 nHandle, - const Any& rValue) throw (::com::sun::star::lang::IllegalArgumentException) + Any &, + Any &, + sal_Int32, + const Any&) throw (::com::sun::star::lang::IllegalArgumentException) { sal_Bool bConverted = sal_False; // here we have to try to convert @@ -496,7 +508,7 @@ OSL_ENSURE(false, "KabCommonStatement::convertFastPropertyValue is not implement return bConverted; } // ------------------------------------------------------------------------- -void KabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception) +void KabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any&) throw (Exception) { // set the value to whatever is nescessary switch (nHandle) @@ -517,7 +529,7 @@ void KabCommonStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,cons OSL_ENSURE(false, "KabCommonStatement::setFastPropertyValue_NoBroadcast is not implemented!"); } // ------------------------------------------------------------------------- -void KabCommonStatement::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const +void KabCommonStatement::getFastPropertyValue(Any&,sal_Int32 nHandle) const { switch (nHandle) { diff --git a/connectivity/source/drivers/kab/kcondition.cxx b/connectivity/source/drivers/kab/kcondition.cxx index 25b7132b6637..51d0904c4fef 100644 --- a/connectivity/source/drivers/kab/kcondition.cxx +++ b/connectivity/source/drivers/kab/kcondition.cxx @@ -4,9 +4,9 @@ * * $RCSfile: kcondition.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: obo $ $Date: 2005-12-19 16:53:00 $ + * last change: $Author: hr $ $Date: 2006-06-20 01:41:01 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -51,8 +51,8 @@ KabCondition::~KabCondition() } // ----------------------------------------------------------------------------- KabConditionConstant::KabConditionConstant(const sal_Bool bValue) - : m_bValue(bValue), - KabCondition() + : KabCondition(), + m_bValue(bValue) { } // ----------------------------------------------------------------------------- @@ -66,7 +66,7 @@ sal_Bool KabConditionConstant::isAlwaysFalse() const return !m_bValue; } // ----------------------------------------------------------------------------- -sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &aAddressee) const +sal_Bool KabConditionConstant::eval(const ::KABC::Addressee &) const { return m_bValue; } @@ -118,8 +118,8 @@ sal_Bool KabConditionNotNull::eval(const ::KABC::Addressee &aAddressee) const } // ----------------------------------------------------------------------------- KabConditionCompare::KabConditionCompare(const ::rtl::OUString &sColumnName, const ::rtl::OUString &sMatchString) throw(SQLException) - : m_sMatchString(sMatchString), - KabConditionColumn(sColumnName) + : KabConditionColumn(sColumnName), + m_sMatchString(sMatchString) { } // ----------------------------------------------------------------------------- @@ -173,9 +173,9 @@ sal_Bool KabConditionSimilar::eval(const ::KABC::Addressee &aAddressee) const } // ----------------------------------------------------------------------------- KabConditionBoolean::KabConditionBoolean(KabCondition *pLeft, KabCondition *pRight) - : m_pLeft(pLeft), - m_pRight(pRight), - KabCondition() + : KabCondition(), + m_pLeft(pLeft), + m_pRight(pRight) { } // ----------------------------------------------------------------------------- |