From 58d79686650495b05abd6a5b6ae9b5be256ac73d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Jan 2005 14:56:40 +0100 Subject: removed compiler warnings --- ndb/src/ndbapi/Ndb.cpp | 4 ++-- ndb/src/ndbapi/NdbDictionaryImpl.cpp | 4 +--- ndb/src/ndbapi/TransporterFacade.cpp | 4 ++-- ndb/src/ndbapi/ndb_cluster_connection.cpp | 4 +++- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'ndb/src/ndbapi') diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index ba878ac4336..e7b36d6ee02 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -47,7 +47,7 @@ NdbTransaction* Ndb::doConnect(Uint32 tConNode) { Uint32 tNode; Uint32 tAnyAlive = 0; - int TretCode; + int TretCode= 0; if (tConNode != 0) { TretCode = NDB_connect(tConNode); @@ -892,7 +892,7 @@ Ndb::opTupleIdOnNdb(Uint32 aTableId, Uint64 opValue, Uint32 op) DBUG_PRINT("enter", ("table=%u value=%llu op=%u", aTableId, opValue, op)); NdbTransaction* tConnection; - NdbOperation* tOperation; + NdbOperation* tOperation= 0; // Compiler warning if not initialized Uint64 tValue; NdbRecAttr* tRecAttrResult; int result; diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 4c53ac89461..583a153fc51 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -1361,9 +1361,7 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, } Uint32 topBit = (1 << 31); - for(i = 31; i>=0; i--){ - if((fragCount & topBit) != 0) - break; + for(; topBit && !(fragCount & topBit); ){ topBit >>= 1; } impl->m_hashValueMask = topBit - 1; diff --git a/ndb/src/ndbapi/TransporterFacade.cpp b/ndb/src/ndbapi/TransporterFacade.cpp index b179c1fe6b9..20d98c63a67 100644 --- a/ndb/src/ndbapi/TransporterFacade.cpp +++ b/ndb/src/ndbapi/TransporterFacade.cpp @@ -473,12 +473,12 @@ void TransporterFacade::threadMainReceive(void) } TransporterFacade::TransporterFacade(NdbMgmHandle mgm_handle) : + m_mgm_handle(mgm_handle), theTransporterRegistry(0), theStopReceive(0), theSendThread(NULL), theReceiveThread(NULL), - m_fragmented_signal_id(0), - m_mgm_handle(mgm_handle) + m_fragmented_signal_id(0) { theOwnId = 0; diff --git a/ndb/src/ndbapi/ndb_cluster_connection.cpp b/ndb/src/ndbapi/ndb_cluster_connection.cpp index 2b3743e013a..0b41171e554 100644 --- a/ndb/src/ndbapi/ndb_cluster_connection.cpp +++ b/ndb/src/ndbapi/ndb_cluster_connection.cpp @@ -491,7 +491,9 @@ int Ndb_cluster_connection::connect(int no_retries, int retry_delay_in_seconds, m_impl.m_transporter_facade->start_instance(nodeId, props); m_impl.init_nodes_vector(nodeId, *props); - for(int i=0;iget_registry()->m_transporter_interface.size();i++) + for(unsigned i=0; + iget_registry()->m_transporter_interface.size(); + i++) ndb_mgm_set_connection_int_parameter(m_impl.m_config_retriever->get_mgmHandle(), nodeId, m_impl.m_transporter_facade->get_registry() -- cgit v1.2.1