diff options
Diffstat (limited to 'ndb/src/common')
-rw-r--r-- | ndb/src/common/mgmcommon/ConfigRetriever.cpp | 7 | ||||
-rw-r--r-- | ndb/src/common/portlib/NdbTick.c | 4 | ||||
-rw-r--r-- | ndb/src/common/transporter/SHM_Transporter.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/transporter/TCP_Transporter.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/transporter/TCP_Transporter.hpp | 1 | ||||
-rw-r--r-- | ndb/src/common/transporter/Transporter.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/transporter/TransporterRegistry.cpp | 2 | ||||
-rw-r--r-- | ndb/src/common/util/Bitmask.cpp | 30 | ||||
-rw-r--r-- | ndb/src/common/util/ConfigValues.cpp | 6 | ||||
-rw-r--r-- | ndb/src/common/util/File.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/util/Properties.cpp | 4 | ||||
-rw-r--r-- | ndb/src/common/util/SocketClient.cpp | 2 | ||||
-rw-r--r-- | ndb/src/common/util/random.c | 8 | ||||
-rw-r--r-- | ndb/src/common/util/socket_io.cpp | 4 |
14 files changed, 42 insertions, 42 deletions
diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp index 414f995181e..bfc9ff8e384 100644 --- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp +++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp @@ -154,12 +154,13 @@ ConfigRetriever::getConfig() { } ndb_mgm_configuration * -ConfigRetriever::getConfig(NdbMgmHandle m_handle) +ConfigRetriever::getConfig(NdbMgmHandle m_handle_arg) { - ndb_mgm_configuration * conf = ndb_mgm_get_configuration(m_handle,m_version); + ndb_mgm_configuration * conf = ndb_mgm_get_configuration(m_handle_arg, + m_version); if(conf == 0) { - setError(CR_ERROR, ndb_mgm_get_latest_error_desc(m_handle)); + setError(CR_ERROR, ndb_mgm_get_latest_error_desc(m_handle_arg)); return 0; } return conf; diff --git a/ndb/src/common/portlib/NdbTick.c b/ndb/src/common/portlib/NdbTick.c index eff6b28b7eb..238e9b1956d 100644 --- a/ndb/src/common/portlib/NdbTick.c +++ b/ndb/src/common/portlib/NdbTick.c @@ -60,9 +60,9 @@ NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros){ int res = gettimeofday(&tick_time, 0); if(secs==0) { - NDB_TICKS secs = tick_time.tv_sec; + NDB_TICKS local_secs = tick_time.tv_sec; *micros = tick_time.tv_usec; - *micros = secs*1000000+*micros; + *micros = local_secs*1000000+*micros; } else { * secs = tick_time.tv_sec; * micros = tick_time.tv_usec; diff --git a/ndb/src/common/transporter/SHM_Transporter.cpp b/ndb/src/common/transporter/SHM_Transporter.cpp index e0c2e726a92..3ce21940254 100644 --- a/ndb/src/common/transporter/SHM_Transporter.cpp +++ b/ndb/src/common/transporter/SHM_Transporter.cpp @@ -31,7 +31,7 @@ SHM_Transporter::SHM_Transporter(TransporterRegistry &t_reg, const char *lHostName, const char *rHostName, int r_port, - bool isMgmConnection, + bool isMgmConnection_arg, NodeId lNodeId, NodeId rNodeId, NodeId serverNodeId, @@ -40,7 +40,7 @@ SHM_Transporter::SHM_Transporter(TransporterRegistry &t_reg, key_t _shmKey, Uint32 _shmSize) : Transporter(t_reg, tt_SHM_TRANSPORTER, - lHostName, rHostName, r_port, isMgmConnection, + lHostName, rHostName, r_port, isMgmConnection_arg, lNodeId, rNodeId, serverNodeId, 0, false, checksum, signalId), shmKey(_shmKey), diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp index 91a5fb50c57..9f873f0476c 100644 --- a/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/ndb/src/common/transporter/TCP_Transporter.cpp @@ -67,14 +67,14 @@ TCP_Transporter::TCP_Transporter(TransporterRegistry &t_reg, const char *lHostName, const char *rHostName, int r_port, - bool isMgmConnection, + bool isMgmConnection_arg, NodeId lNodeId, NodeId rNodeId, NodeId serverNodeId, bool chksm, bool signalId, Uint32 _reportFreq) : Transporter(t_reg, tt_TCP_TRANSPORTER, - lHostName, rHostName, r_port, isMgmConnection, + lHostName, rHostName, r_port, isMgmConnection_arg, lNodeId, rNodeId, serverNodeId, 0, false, chksm, signalId), m_sendBuffer(sendBufSize) diff --git a/ndb/src/common/transporter/TCP_Transporter.hpp b/ndb/src/common/transporter/TCP_Transporter.hpp index 8cba7a01532..4e0de15bdbe 100644 --- a/ndb/src/common/transporter/TCP_Transporter.hpp +++ b/ndb/src/common/transporter/TCP_Transporter.hpp @@ -33,6 +33,7 @@ struct ReceiveBuffer { Uint32 sizeOfData; // In bytes Uint32 sizeOfBuffer; + ReceiveBuffer() {} bool init(int bytes); void destroy(); diff --git a/ndb/src/common/transporter/Transporter.cpp b/ndb/src/common/transporter/Transporter.cpp index 339533c8d27..c0f9a5bfb40 100644 --- a/ndb/src/common/transporter/Transporter.cpp +++ b/ndb/src/common/transporter/Transporter.cpp @@ -103,7 +103,7 @@ Transporter::connect_server(NDB_SOCKET_TYPE sockfd) { { struct sockaddr_in addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); - int r= getpeername(sockfd, (struct sockaddr*)&addr, &addrlen); + getpeername(sockfd, (struct sockaddr*)&addr, &addrlen); m_connect_address= (&addr)->sin_addr; } @@ -209,7 +209,7 @@ Transporter::connect_client(NDB_SOCKET_TYPE sockfd) { { struct sockaddr_in addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); - int r= getpeername(sockfd, (struct sockaddr*)&addr, &addrlen); + getpeername(sockfd, (struct sockaddr*)&addr, &addrlen); m_connect_address= (&addr)->sin_addr; } diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index bd3136f023c..bd2ff0d3062 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -1413,8 +1413,6 @@ TransporterRegistry::add_transporter_interface(NodeId remoteNodeId, bool TransporterRegistry::start_service(SocketServer& socket_server) { - struct ndb_mgm_reply mgm_reply; - DBUG_ENTER("TransporterRegistry::start_service"); if (m_transporter_interface.size() > 0 && !nodeIdSpecified) { diff --git a/ndb/src/common/util/Bitmask.cpp b/ndb/src/common/util/Bitmask.cpp index f5b822ff08e..4b90e5a01f4 100644 --- a/ndb/src/common/util/Bitmask.cpp +++ b/ndb/src/common/util/Bitmask.cpp @@ -16,21 +16,6 @@ #include <Bitmask.hpp> #include <NdbOut.hpp> -static -void print(const Uint32 src[], Uint32 len, Uint32 pos = 0) -{ - printf("b'"); - for(unsigned i = 0; i<len; i++) - { - if(BitmaskImpl::get((pos + len + 31) >> 5, src, i+pos)) - printf("1"); - else - printf("0"); - if((i & 31) == 31) - printf(" "); - } -} - #ifndef __TEST_BITMASK__ void @@ -95,6 +80,21 @@ BitmaskImpl::setFieldImpl(Uint32 dst[], } #else +static +void print(const Uint32 src[], Uint32 len, Uint32 pos = 0) +{ + printf("b'"); + for(unsigned i = 0; i<len; i++) + { + if(BitmaskImpl::get((pos + len + 31) >> 5, src, i+pos)) + printf("1"); + else + printf("0"); + if((i & 31) == 31) + printf(" "); + } +} + #define DEBUG 0 #include <Vector.hpp> static void do_test(int bitmask_size); diff --git a/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp index 87870a5f11f..74614dfd2df 100644 --- a/ndb/src/common/util/ConfigValues.cpp +++ b/ndb/src/common/util/ConfigValues.cpp @@ -447,13 +447,13 @@ ConfigValuesFactory::put(const ConfigValues::Entry & entry){ if(count >= sz){ pos = hash(tmp, sz); count = 0; - Uint32 val = m_cfg->m_values[pos]; + Uint32 val2 = m_cfg->m_values[pos]; printf("key: %d, (key %% size): %d\n", entry.m_key, (entry.m_key % sz)); printf("pos: %d", pos); - while((val & KP_MASK) != tmp && val != CFV_KEY_FREE && count < sz){ + while((val2 & KP_MASK) != tmp && val2 != CFV_KEY_FREE && count < sz){ pos = nextHash(tmp, sz, pos, ++count); - val = m_cfg->m_values[pos]; + val2 = m_cfg->m_values[pos]; printf(" %d", pos); } printf("\n"); diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp index 23bf3415df9..a75fa5ae463 100644 --- a/ndb/src/common/util/File.cpp +++ b/ndb/src/common/util/File.cpp @@ -162,9 +162,9 @@ File_class::readChar(char* buf) } int -File_class::write(const void* buf, size_t size, size_t nitems) +File_class::write(const void* buf, size_t size_arg, size_t nitems) { - return ::fwrite(buf, size, nitems, m_file); + return ::fwrite(buf, size_arg, nitems, m_file); } int diff --git a/ndb/src/common/util/Properties.cpp b/ndb/src/common/util/Properties.cpp index 8d5c56affd3..11a1d8690ae 100644 --- a/ndb/src/common/util/Properties.cpp +++ b/ndb/src/common/util/Properties.cpp @@ -627,11 +627,11 @@ PropertiesImpl::getPropsPut(const char * name, if(nvp == 0){ Properties * tmpP = new Properties(); PropertyImpl * tmpPI = new PropertyImpl(tmp2, tmpP); - PropertyImpl * nvp = put(tmpPI); + PropertyImpl * nvp2 = put(tmpPI); delete tmpP; free(tmp2); - return ((Properties*)nvp->value)->impl->getPropsPut(tmp+1, impl); + return ((Properties*)nvp2->value)->impl->getPropsPut(tmp+1, impl); } free(tmp2); if(nvp->valueType != PropertiesType_Properties){ diff --git a/ndb/src/common/util/SocketClient.cpp b/ndb/src/common/util/SocketClient.cpp index bb059585863..32eee1db00c 100644 --- a/ndb/src/common/util/SocketClient.cpp +++ b/ndb/src/common/util/SocketClient.cpp @@ -87,7 +87,7 @@ SocketClient::bind(const char* bindaddress, unsigned short localport) int ret = errno; NDB_CLOSE_SOCKET(m_sockfd); m_sockfd= NDB_INVALID_SOCKET; - return errno; + return ret; } if (::bind(m_sockfd, (struct sockaddr*)&local, sizeof(local)) == -1) diff --git a/ndb/src/common/util/random.c b/ndb/src/common/util/random.c index 3d4a48e7ef0..20ef537d89a 100644 --- a/ndb/src/common/util/random.c +++ b/ndb/src/common/util/random.c @@ -197,7 +197,7 @@ int initSequence(RandomSequence *seq, SequenceValues *inputValues) unsigned int i; unsigned int j; unsigned int totalLength; - unsigned int index; + unsigned int idx; if( !seq || !inputValues ) return(-1); @@ -219,12 +219,12 @@ int initSequence(RandomSequence *seq, SequenceValues *inputValues) /*----------------------*/ /* set the array values */ /*----------------------*/ - index = 0; + idx = 0; for(i = 0; inputValues[i].length != 0; i++) { for(j = 0; j < inputValues[i].length; j++ ) { - seq->values[index] = inputValues[i].value; - index++; + seq->values[idx] = inputValues[i].value; + idx++; } } diff --git a/ndb/src/common/util/socket_io.cpp b/ndb/src/common/util/socket_io.cpp index 9bc6b4d53fb..2dd2a9f31a8 100644 --- a/ndb/src/common/util/socket_io.cpp +++ b/ndb/src/common/util/socket_io.cpp @@ -164,8 +164,8 @@ write_socket(NDB_SOCKET_TYPE socket, int timeout_millis, FD_SET(socket, &writeset); timeout.tv_sec = 1; timeout.tv_usec = 0; - const int selectRes = select(socket + 1, 0, &writeset, 0, &timeout); - if(selectRes != 1){ + const int selectRes2 = select(socket + 1, 0, &writeset, 0, &timeout); + if(selectRes2 != 1){ return -1; } } |