Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

Cppcheck reports this :
core/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
1044    unreachableCode style   Statements following return, break, continue,
goto or throw will never be executed.
   1039 Reference< XResultSet > SAL_CALL
MacabDatabaseMetaData::getVersionColumns(
   1040     const Any&, const ::rtl::OUString&, const ::rtl::OUString& table
) throw(SQLException, RuntimeException)
   1041 {
   1042     return new ODatabaseMetaDataResultSet(
ODatabaseMetaDataResultSet::eVersionColumns );
   1043 
   1044     ::connectivity::ODatabaseMetaDataResultSet* pResult = new
::connectivity::ODatabaseMetaDataResultSet(::connectivity::ODatabaseMetaDataResultSet::eVersionColumns);
   1045     Reference< XResultSet > xRef = pResult;
   1046 
   1047     ODatabaseMetaDataResultSet::ORows aRows;
...

I fixed some reports like this but it was just a return after a throw
usually.
Here I hesitate to just remove all the lines after the return. Perhaps the
return is wrong.

Any idea ?

Julien.

--
View this message in context: 
http://nabble.documentfoundation.org/Several-lines-not-executed-in-a-function-of-MacabDatabaseMetaData-cxx-tp3716889p3716889.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.