summaryrefslogtreecommitdiff
path: root/ndb/src
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src')
-rw-r--r--ndb/src/common/mgmcommon/ConfigRetriever.cpp7
-rw-r--r--ndb/src/common/portlib/NdbTick.c4
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.cpp4
-rw-r--r--ndb/src/common/transporter/TCP_Transporter.cpp4
-rw-r--r--ndb/src/common/transporter/TCP_Transporter.hpp1
-rw-r--r--ndb/src/common/transporter/Transporter.cpp4
-rw-r--r--ndb/src/common/transporter/TransporterRegistry.cpp2
-rw-r--r--ndb/src/common/util/Bitmask.cpp30
-rw-r--r--ndb/src/common/util/ConfigValues.cpp6
-rw-r--r--ndb/src/common/util/File.cpp4
-rw-r--r--ndb/src/common/util/Properties.cpp4
-rw-r--r--ndb/src/common/util/SocketClient.cpp2
-rw-r--r--ndb/src/common/util/random.c8
-rw-r--r--ndb/src/common/util/socket_io.cpp4
-rw-r--r--ndb/src/cw/cpcd/APIService.cpp1
-rw-r--r--ndb/src/cw/cpcd/main.cpp2
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp8
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp5
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.hpp6
-rw-r--r--ndb/src/kernel/blocks/dbdih/Dbdih.hpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/Dblqh.hpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/DblqhMain.cpp9
-rw-r--r--ndb/src/kernel/blocks/dbtc/Dbtc.hpp4
-rw-r--r--ndb/src/kernel/blocks/dbtup/Dbtup.hpp1
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupScan.cpp1
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp1
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp1
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp4
-rw-r--r--ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp2
-rw-r--r--ndb/src/kernel/blocks/qmgr/Qmgr.hpp2
-rw-r--r--ndb/src/kernel/blocks/qmgr/QmgrMain.cpp2
-rw-r--r--ndb/src/kernel/blocks/suma/Suma.cpp6
-rw-r--r--ndb/src/kernel/blocks/suma/Suma.hpp1
-rw-r--r--ndb/src/kernel/vm/MetaData.hpp1
-rw-r--r--ndb/src/mgmapi/LocalConfig.cpp18
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp13
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.cpp3
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.cpp6
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.hpp7
-rw-r--r--ndb/src/mgmsrv/InitConfigFileParser.cpp25
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp8
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.hpp1
-rw-r--r--ndb/src/mgmsrv/Services.cpp9
-rw-r--r--ndb/src/mgmsrv/main.cpp1
-rw-r--r--ndb/src/ndbapi/ClusterMgr.hpp1
-rw-r--r--ndb/src/ndbapi/Ndb.cpp2
-rw-r--r--ndb/src/ndbapi/NdbBlob.cpp2
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.cpp5
-rw-r--r--ndb/src/ndbapi/NdbIndexOperation.cpp2
-rw-r--r--ndb/src/ndbapi/NdbOperationDefine.cpp3
-rw-r--r--ndb/src/ndbapi/NdbOperationExec.cpp2
-rw-r--r--ndb/src/ndbapi/NdbOperationSearch.cpp3
-rw-r--r--ndb/src/ndbapi/NdbScanFilter.cpp1
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp3
-rw-r--r--ndb/src/ndbapi/SignalSender.cpp2
-rw-r--r--ndb/src/ndbapi/ndb_cluster_connection.cpp1
58 files changed, 119 insertions, 150 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;
}
}
diff --git a/ndb/src/cw/cpcd/APIService.cpp b/ndb/src/cw/cpcd/APIService.cpp
index 5bbf2c86e23..1c1cfb94cd4 100644
--- a/ndb/src/cw/cpcd/APIService.cpp
+++ b/ndb/src/cw/cpcd/APIService.cpp
@@ -389,7 +389,6 @@ CPCDAPISession::listProcesses(Parser_t::Context & /* unused */,
void
CPCDAPISession::showVersion(Parser_t::Context & /* unused */,
const class Properties & args){
- Uint32 id;
CPCD::RequestStatus rs;
m_output->println("show version");
diff --git a/ndb/src/cw/cpcd/main.cpp b/ndb/src/cw/cpcd/main.cpp
index 7021b4bc68d..f23a92b8010 100644
--- a/ndb/src/cw/cpcd/main.cpp
+++ b/ndb/src/cw/cpcd/main.cpp
@@ -74,8 +74,6 @@ extern "C" static void sig_child(int signo, siginfo_t*, void*);
const char *progname = "ndb_cpcd";
int main(int argc, char** argv){
- int save_argc= argc;
- char** save_argv= argv;
const char *load_default_groups[]= { "ndb_cpcd",0 };
MY_INIT(argv[0]);
diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index 6ab0f620d84..8dc1ba39fea 100644
--- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -1246,7 +1246,7 @@ Cmvmi::execTESTSIG(Signal* signal){
fprintf(stdout, "\n");
for(i = 0; i<signal->header.m_noOfSections; i++){
- SegmentedSectionPtr ptr = {0,0,0};
+ SegmentedSectionPtr ptr(0,0,0);
ndbout_c("-- Section %d --", i);
signal->getSection(ptr, i);
ndbrequire(ptr.p != 0);
@@ -1304,7 +1304,7 @@ Cmvmi::execTESTSIG(Signal* signal){
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr(0,0,0);
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1353,7 +1353,7 @@ Cmvmi::execTESTSIG(Signal* signal){
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr(0,0,0);
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1419,7 +1419,7 @@ Cmvmi::execTESTSIG(Signal* signal){
const Uint32 secs = signal->getNoOfSections();
memset(g_test, 0, sizeof(g_test));
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr = {0,0,0};
+ SegmentedSectionPtr sptr(0,0,0);
signal->getSection(sptr, i);
g_test[i].sz = sptr.sz;
g_test[i].p = new Uint32[sptr.sz];
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 7b82631884f..2b24f0e87e3 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -5067,11 +5067,6 @@ void Dbdict::handleTabInfoInit(SimpleProperties::Reader & it,
tablePtr.p->minRowsLow = tableDesc.MinRowsLow;
tablePtr.p->minRowsHigh = tableDesc.MinRowsHigh;
- Uint64 maxRows =
- (((Uint64)tablePtr.p->maxRowsHigh) << 32) + tablePtr.p->maxRowsLow;
- Uint64 minRows =
- (((Uint64)tablePtr.p->minRowsHigh) << 32) + tablePtr.p->minRowsLow;
-
tablePtr.p->frmLen = tableDesc.FrmLen;
memcpy(tablePtr.p->frmData, tableDesc.FrmData, tableDesc.FrmLen);
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index 49b85affdcd..823e8898864 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -131,6 +131,7 @@ public:
* on disk. Index trigger ids are volatile.
*/
struct TableRecord : public MetaData::Table {
+ TableRecord() {}
Uint32 maxRowsLow;
Uint32 maxRowsHigh;
Uint32 minRowsLow;
@@ -250,6 +251,7 @@ public:
* attributes. This is wrong but convenient.
*/
struct AttributeRecord : public MetaData::Attribute {
+ AttributeRecord() {}
union {
/** Pointer to the next attribute used by ArrayPool */
Uint32 nextPool;
@@ -285,6 +287,7 @@ public:
* trigger online creates the trigger in TC (if index) and LQH-TUP.
*/
struct TriggerRecord {
+ TriggerRecord() {}
/** Trigger state */
enum TriggerState {
@@ -864,6 +867,7 @@ private:
* seize/release invokes ctor/dtor automatically.
*/
struct OpRecordCommon {
+ OpRecordCommon() {}
Uint32 key; // key shared between master and slaves
Uint32 nextHash;
Uint32 prevHash;
@@ -879,6 +883,7 @@ private:
* Create table record
*/
struct CreateTableRecord : OpRecordCommon {
+ CreateTableRecord() {}
Uint32 m_senderRef;
Uint32 m_senderData;
Uint32 m_coordinatorRef;
@@ -917,6 +922,7 @@ private:
* Drop table record
*/
struct DropTableRecord : OpRecordCommon {
+ DropTableRecord() {}
DropTableReq m_request;
Uint32 m_requestType;
diff --git a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
index e8f24876979..c97d3286462 100644
--- a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+++ b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
@@ -1288,6 +1288,7 @@ public:
private:
struct LcpState {
+ LcpState() {}
LcpStatus lcpStatus;
Uint32 lcpStatusUpdatedPlace;
@@ -1394,6 +1395,7 @@ public:
private:
class MasterTakeOverState {
public:
+ MasterTakeOverState() {}
void set(LcpMasterTakeOverState s, Uint32 line) {
state = s; updatePlace = line;
}
@@ -1481,6 +1483,7 @@ private:
* SwitchReplicaRecord - Should only be used by master
*/
struct SwitchReplicaRecord {
+ SwitchReplicaRecord() {}
void clear(){}
Uint32 nodeId;
diff --git a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
index 817832bdfcb..af6474bc917 100644
--- a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+++ b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
@@ -509,6 +509,7 @@ public:
typedef Ptr<Databuf> DatabufPtr;
struct ScanRecord {
+ ScanRecord() {}
enum ScanState {
SCAN_FREE = 0,
WAIT_STORED_PROC_COPY = 1,
@@ -2899,6 +2900,7 @@ public:
*
*/
struct CommitAckMarker {
+ CommitAckMarker() {}
Uint32 transid1;
Uint32 transid2;
@@ -2925,6 +2927,7 @@ public:
void scanMarkers(Signal* signal, Uint32 tcNodeFail, Uint32 bucket, Uint32 i);
struct Counters {
+ Counters() {}
Uint32 operations;
inline void clear(){
diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index 6a439b24c03..ea0d905655e 100644
--- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -7548,7 +7548,6 @@ Dblqh::get_acc_ptr_from_scan_record(ScanRecord* scanP,
bool crash_flag)
{
Uint32* acc_ptr;
- Uint32 attr_buf_rec, attr_buf_index;
if (!((index < MAX_PARALLEL_OP_PER_SCAN) &&
index < scanP->scan_acc_index)) {
ndbrequire(crash_flag);
@@ -7593,7 +7592,6 @@ void Dblqh::execSCAN_FRAGREQ(Signal* signal)
const Uint32 scanLockMode = ScanFragReq::getLockMode(reqinfo);
const Uint8 keyinfo = ScanFragReq::getKeyinfoFlag(reqinfo);
const Uint8 rangeScan = ScanFragReq::getRangeScanFlag(reqinfo);
- const Uint8 tupScan = ScanFragReq::getTupScanFlag(reqinfo);
ptrCheckGuard(tabptr, ctabrecFileSize, tablerec);
if(tabptr.p->tableStatus != Tablerec::TABLE_DEFINED){
@@ -8979,9 +8977,6 @@ Uint32 Dblqh::sendKeyinfo20(Signal* signal,
const Uint32 scanOp = scanP->m_curr_batch_size_rows;
const Uint32 nodeId = refToNode(ref);
const bool connectedToNode = getNodeInfo(nodeId).m_connected;
- const Uint32 type = getNodeInfo(nodeId).m_type;
- const bool is_api = (type >= NodeInfo::API && type <= NodeInfo::REP);
- const bool old_dest = (getNodeInfo(nodeId).m_version < MAKE_VERSION(3,5,0));
const bool longable = true; // TODO is_api && !old_dest;
Uint32 * dst = keyInfo->keyData;
@@ -9082,7 +9077,6 @@ void Dblqh::sendScanFragConf(Signal* signal, Uint32 scanCompleted)
return;
}
ScanFragConf * conf = (ScanFragConf*)&signal->theData[0];
- NodeId tc_node_id= refToNode(tcConnectptr.p->clientBlockref);
Uint32 trans_id1= tcConnectptr.p->transid[0];
Uint32 trans_id2= tcConnectptr.p->transid[1];
@@ -11368,7 +11362,6 @@ void Dblqh::sendAccContOp(Signal* signal)
{
LcpLocRecordPtr sacLcpLocptr;
- int count = 0;
sacLcpLocptr.i = lcpPtr.p->firstLcpLocAcc;
do {
ptrCheckGuard(sacLcpLocptr, clcpLocrecFileSize, lcpLocRecord);
@@ -15070,8 +15063,6 @@ void Dblqh::execDEBUG_SIG(Signal* signal)
2.5 TEMPORARY VARIABLES
-----------------------
*/
- UintR tdebug;
-
jamEntry();
//logPagePtr.i = signal->theData[0];
//tdebug = logPagePtr.p->logPageWord[0];
diff --git a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
index c6089113382..158e71bbc55 100644
--- a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+++ b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
@@ -303,6 +303,7 @@ public:
/* WHEN THE TRIGGER IS DEACTIVATED. */
/* **************************************** */
struct TcDefinedTriggerData {
+ TcDefinedTriggerData() {}
/**
* Trigger id, used to identify the trigger
*/
@@ -957,6 +958,7 @@ public:
/* ALL TABLES IN THE SYSTEM. */
/********************************************************/
struct TableRecord {
+ TableRecord() {}
Uint32 currentSchemaVersion;
Uint8 enabled;
Uint8 dropping;
@@ -1666,6 +1668,7 @@ private:
UintR tcheckGcpId;
struct TransCounters {
+ TransCounters() {}
enum { Off, Timer, Started } c_trans_status;
UintR cattrinfoCount;
UintR ctransCount;
@@ -1804,6 +1807,7 @@ private:
*/
public:
struct CommitAckMarker {
+ CommitAckMarker() {}
Uint32 transid1;
Uint32 transid2;
union { Uint32 nextPool; Uint32 nextHash; };
diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
index 3079a530807..0dd88364bc4 100644
--- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
@@ -747,6 +747,7 @@ typedef Ptr<RestartInfoRecord> RestartInfoRecordPtr;
/* WHEN THE TRIGGER IS DEACTIVATED. */
/* **************************************** */
struct TupTriggerData {
+ TupTriggerData() {}
/**
* Trigger id, used by DICT/TRIX to identify the trigger
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
index 9439509d102..59c1a1d1d78 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
@@ -89,7 +89,6 @@ Dbtup::execNEXT_SCANREQ(Signal* signal)
FragrecordPtr fragPtr;
fragPtr.i = scan.m_fragPtrI[0];
ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord);
- Fragrecord& frag = *fragPtr.p;
switch (req->scanFlag) {
case NextScanReq::ZSCAN_NEXT:
jam();
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp
index 32cd7ab0460..13485a31414 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp
@@ -401,8 +401,6 @@ Dbtux::nodePopUpScans(NodeHandle& node, unsigned pos)
void
Dbtux::nodeSlide(NodeHandle& dstNode, NodeHandle& srcNode, unsigned cnt, unsigned i)
{
- Frag& frag = dstNode.m_frag;
- TreeHead& tree = frag.m_tree;
ndbrequire(i <= 1);
while (cnt != 0) {
TreeEnt ent;
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
index 3d59b8aad4f..7eae1486d43 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
@@ -704,7 +704,6 @@ Dbtux::scanFirst(ScanOpPtr scanPtr)
debugOut << "Enter first scan " << scanPtr.i << " " << scan << endl;
}
#endif
- TreeHead& tree = frag.m_tree;
// set up index keys for this operation
setKeyAttrs(frag);
// scan direction 0, 1
@@ -985,7 +984,6 @@ Dbtux::scanVisible(ScanOpPtr scanPtr, TreeEnt ent)
const Frag& frag = *c_fragPool.getPtr(scan.m_fragPtrI);
Uint32 fragBit = ent.m_fragBit;
Uint32 tableFragPtrI = frag.m_tupTableFragPtrI[fragBit];
- Uint32 fragId = frag.m_fragId | fragBit;
Uint32 tupAddr = getTupAddr(frag, ent);
Uint32 tupVersion = ent.m_tupVersion;
// check for same tuple twice in row
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp
index 5bca96667b9..31772abadaf 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp
@@ -212,7 +212,6 @@ Dbtux::treeRemove(Frag& frag, TreePos treePos)
void
Dbtux::treeRemoveInner(Frag& frag, NodeHandle lubNode, unsigned pos)
{
- TreeHead& tree = frag.m_tree;
TreeEnt ent;
// find g.l.b node
NodeHandle glbNode(frag);
diff --git a/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp b/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
index ec9d4a0dc60..e7a6b329508 100644
--- a/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
+++ b/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
@@ -82,6 +82,7 @@ public:
*/
struct StartRecord {
+ StartRecord() {}
Uint64 m_startTime;
void reset();
diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
index 26e8f246293..f8b15e9ec35 100644
--- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
@@ -818,7 +818,6 @@ Ndbcntr::trySystemRestart(Signal* signal){
*/
const bool allNodes = c_start.m_waiting.equal(c_allDefinedNodes);
const bool allClusterNodes = c_start.m_waiting.equal(c_clusterNodes);
- const Uint64 now = NdbTick_CurrentMillisecond();
if(!allClusterNodes){
jam();
@@ -1390,7 +1389,6 @@ void Ndbcntr::execNODE_FAILREP(Signal* signal)
const bool tMasterFailed = allFailed.get(cmasterNodeId);
const bool tStarted = !failedStarted.isclear();
const bool tStarting = !failedStarting.isclear();
- const bool tWaiting = !failedWaiting.isclear();
if(tMasterFailed){
jam();
@@ -2471,8 +2469,6 @@ void Ndbcntr::execABORT_ALL_CONF(Signal* signal){
void Ndbcntr::execABORT_ALL_REF(Signal* signal){
jamEntry();
- AbortAllRef *abortAllRef = (AbortAllRef *)&signal->theData[0];
- AbortAllRef::ErrorCode errorCode = (AbortAllRef::ErrorCode) abortAllRef->errorCode;
StopRef * const stopRef = (StopRef *)&signal->theData[0];
stopRef->senderData = c_stopRec.stopReq.senderData;
diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp b/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
index da7f33ae78d..99dd4aea207 100644
--- a/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
@@ -106,6 +106,8 @@ class AsyncFile;
class Request
{
public:
+ Request() {}
+
enum Action {
open,
close,
diff --git a/ndb/src/kernel/blocks/qmgr/Qmgr.hpp b/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
index fd140c85589..2ddd752fba5 100644
--- a/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
+++ b/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
@@ -101,6 +101,7 @@ public:
};
struct StartRecord {
+ StartRecord() {}
void reset(){
m_startKey++;
m_startNode = 0;
@@ -169,6 +170,7 @@ public:
};
struct ArbitRec {
+ ArbitRec() {}
ArbitState state; // state
bool newstate; // flag to initialize new state
unsigned thread; // identifies a continueB "thread"
diff --git a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
index 66acdfd51e4..04a06bd4cf6 100644
--- a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
+++ b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
@@ -845,7 +845,6 @@ void Qmgr::execCM_REGCONF(Signal* signal)
jamEntry();
const CmRegConf * const cmRegConf = (CmRegConf *)&signal->theData[0];
- Uint32 presidentNodeId = cmRegConf->presidentNodeId;
if (!ndbCompatible_ndb_ndb(NDB_VERSION, cmRegConf->presidentVersion)) {
jam();
@@ -1270,7 +1269,6 @@ Qmgr::check_startup(Signal* signal)
/**
* Check for missing node group directly
*/
- char buf[100];
NdbNodeBitmask check;
check.assign(c_definedNodes);
check.bitANDC(c_start.m_starting_nodes); // Not connected nodes
diff --git a/ndb/src/kernel/blocks/suma/Suma.cpp b/ndb/src/kernel/blocks/suma/Suma.cpp
index be3171da7a0..006fb21bd77 100644
--- a/ndb/src/kernel/blocks/suma/Suma.cpp
+++ b/ndb/src/kernel/blocks/suma/Suma.cpp
@@ -1434,7 +1434,6 @@ SumaParticipant::SyncRecord::nextScan(Signal* signal){
LocalDataBuffer<15> attrBuf(suma.c_dataBufferPool, head);
ScanFragReq * req = (ScanFragReq *)signal->getDataPtrSend();
- const Uint32 parallelism = 16;
const Uint32 attrLen = 5 + attrBuf.getSize();
req->senderData = m_subscriptionPtrI;
@@ -1610,10 +1609,6 @@ SumaParticipant::execSCAN_HBREP(Signal* signal){
static Uint32 f_bufferLock = 0;
static Uint32 f_buffer[SUMA_BUF_SZ];
-static Uint32 f_trigBufferSize = 0;
-static Uint32 b_bufferLock = 0;
-static Uint32 b_buffer[SUMA_BUF_SZ];
-static Uint32 b_trigBufferSize = 0;
void
SumaParticipant::execTRANSID_AI(Signal* signal){
@@ -1717,7 +1712,6 @@ SumaParticipant::execSUB_REMOVE_REQ(Signal* signal) {
return;
}
- int count = 0;
{
jam();
SubscriberPtr i_subbPtr;
diff --git a/ndb/src/kernel/blocks/suma/Suma.hpp b/ndb/src/kernel/blocks/suma/Suma.hpp
index 8c423a57569..e479ebb7691 100644
--- a/ndb/src/kernel/blocks/suma/Suma.hpp
+++ b/ndb/src/kernel/blocks/suma/Suma.hpp
@@ -208,6 +208,7 @@ public:
friend struct SyncRecord;
struct Subscription {
+ Subscription() {}
Uint32 m_subscriberRef;
Uint32 m_subscriberData;
Uint32 m_senderRef;
diff --git a/ndb/src/kernel/vm/MetaData.hpp b/ndb/src/kernel/vm/MetaData.hpp
index 9c34ac2b612..23d068354b5 100644
--- a/ndb/src/kernel/vm/MetaData.hpp
+++ b/ndb/src/kernel/vm/MetaData.hpp
@@ -67,6 +67,7 @@ public:
*/
class Table {
public:
+ Table() {}
/* Table id (array index in DICT and other blocks) */
Uint32 tableId;
diff --git a/ndb/src/mgmapi/LocalConfig.cpp b/ndb/src/mgmapi/LocalConfig.cpp
index f01b6ff3da3..476e2d6dd84 100644
--- a/ndb/src/mgmapi/LocalConfig.cpp
+++ b/ndb/src/mgmapi/LocalConfig.cpp
@@ -73,9 +73,9 @@ LocalConfig::init(const char *connectString,
//4. Check Ndb.cfg in NDB_HOME
{
bool fopenError;
- char *buf= NdbConfig_NdbCfgName(1 /*true*/);
- NdbAutoPtr<char> tmp_aptr(buf);
- if(readFile(buf, fopenError))
+ char *buf2= NdbConfig_NdbCfgName(1 /*true*/);
+ NdbAutoPtr<char> tmp_aptr(buf2);
+ if(readFile(buf2, fopenError))
DBUG_RETURN(true);
if (!fopenError)
DBUG_RETURN(false);
@@ -84,9 +84,9 @@ LocalConfig::init(const char *connectString,
//5. Check Ndb.cfg in cwd
{
bool fopenError;
- char *buf= NdbConfig_NdbCfgName(0 /*false*/);
- NdbAutoPtr<char> tmp_aptr(buf);
- if(readFile(buf, fopenError))
+ char *buf2= NdbConfig_NdbCfgName(0 /*false*/);
+ NdbAutoPtr<char> tmp_aptr(buf2);
+ if(readFile(buf2, fopenError))
DBUG_RETURN(true);
if (!fopenError)
DBUG_RETURN(false);
@@ -94,9 +94,9 @@ LocalConfig::init(const char *connectString,
//7. Check
{
- char buf[256];
- BaseString::snprintf(buf, sizeof(buf), "host=localhost:%s", NDB_PORT);
- if(readConnectString(buf, "default connect string"))
+ char buf2[256];
+ BaseString::snprintf(buf2, sizeof(buf2), "host=localhost:%s", NDB_PORT);
+ if(readConnectString(buf2, "default connect string"))
DBUG_RETURN(true);
}
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index 2f49efd9f58..b4c60053f03 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -454,7 +454,6 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
LocalConfig &cfg= handle->cfg;
NDB_SOCKET_TYPE sockfd= NDB_INVALID_SOCKET;
Uint32 i;
- int binderror = 0;
SocketClient s(0, 0);
if (!s.init())
{
@@ -823,12 +822,12 @@ ndb_mgm_get_status(NdbMgmHandle handle)
break;
}
- Vector<BaseString> split;
- tmp.split(split, ":.", 4);
- if(split.size() != 4)
+ Vector<BaseString> split2;
+ tmp.split(split2, ":.", 4);
+ if(split2.size() != 4)
break;
- const int id = atoi(split[1].c_str());
+ const int id = atoi(split2[1].c_str());
if(id != nodeId){
ptr++;
i++;
@@ -836,9 +835,9 @@ ndb_mgm_get_status(NdbMgmHandle handle)
ptr->node_id = id;
}
- split[3].trim(" \t\n");
+ split2[3].trim(" \t\n");
- if(status_ackumulate(ptr,split[2].c_str(), split[3].c_str()) != 0) {
+ if(status_ackumulate(ptr,split2[2].c_str(), split2[3].c_str()) != 0) {
break;
}
}
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp
index 2ea98a57866..2ebf218a460 100644
--- a/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -1549,7 +1549,6 @@ CommandInterpreter::executePurge(char* parameters)
return -1;
}
- int i;
char *str;
if (ndb_mgm_purge_stale_sessions(m_mgmsrv, &str)) {
@@ -1667,7 +1666,6 @@ CommandInterpreter::executeConnect(char* parameters, bool interactive)
{
BaseString *basestring = NULL;
- int retval;
disconnect();
if (!emptyString(parameters)) {
basestring= new BaseString(parameters);
@@ -2102,7 +2100,6 @@ CommandInterpreter::executeStatus(int processId,
ndb_mgm_node_status status;
Uint32 startPhase, version;
- bool system;
struct ndb_mgm_cluster_state *cl;
cl = ndb_mgm_get_status(m_mgmsrv);
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index 787ea2c1899..e5ea68a6c84 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -2317,7 +2317,6 @@ ConfigInfo::ConfigInfo()
break;
case CI_BOOL:
{
- bool tmp_bool;
require(InitConfigFileParser::convertStringToBool(param._default, default_bool));
require(p->put(param._fname, default_bool));
break;
@@ -2325,7 +2324,6 @@ ConfigInfo::ConfigInfo()
case CI_INT:
case CI_INT64:
{
- Uint64 tmp_uint64;
require(InitConfigFileParser::convertStringToUint64(param._default, default_uint64));
require(p->put(param._fname, default_uint64));
break;
@@ -2841,7 +2839,7 @@ applyDefaultValues(InitConfigFileParser::Context & ctx,
Properties::Iterator it(defaults);
for(const char * name = it.first(); name != NULL; name = it.next()){
- ConfigInfo::Status st = ctx.m_info->getStatus(ctx.m_currentInfo, name);
+ (void) ctx.m_info->getStatus(ctx.m_currentInfo, name);
if(!ctx.m_currentSection->contains(name)){
switch (ctx.m_info->getType(ctx.m_currentInfo, name)){
case ConfigInfo::CI_INT:
@@ -3448,7 +3446,7 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){
if(!ctx.m_currentInfo->get(n, &info))
continue;
- Uint32 id = 0;
+ id = 0;
info->get("Id", &id);
if(id == KEY_INTERNAL)
diff --git a/ndb/src/mgmsrv/ConfigInfo.hpp b/ndb/src/mgmsrv/ConfigInfo.hpp
index 08b12522807..6f9c8ad17b8 100644
--- a/ndb/src/mgmsrv/ConfigInfo.hpp
+++ b/ndb/src/mgmsrv/ConfigInfo.hpp
@@ -26,8 +26,11 @@
* A MANDATORY parameters must be specified in the config file
* An UNDEFINED parameter may or may not be specified in the config file
*/
-static const char* MANDATORY = (char*)~(UintPtr)0;// Default value for mandatory params.
-static const char* UNDEFINED = 0; // Default value for undefined params.
+
+// Default value for mandatory params.
+#define MANDATORY ((char*)~(UintPtr)0)
+// Default value for undefined params.
+#define UNDEFINED ((char*) 0)
/**
* @class ConfigInfo
diff --git a/ndb/src/mgmsrv/InitConfigFileParser.cpp b/ndb/src/mgmsrv/InitConfigFileParser.cpp
index fdfc0cde1a2..30f569d3735 100644
--- a/ndb/src/mgmsrv/InitConfigFileParser.cpp
+++ b/ndb/src/mgmsrv/InitConfigFileParser.cpp
@@ -689,34 +689,35 @@ load_defaults(Vector<struct my_option>& options, const char* groups[])
BaseString extra_file;
BaseString group_suffix;
- const char *save_file = defaults_file;
- char *save_extra_file = defaults_extra_file;
- const char *save_group_suffix = defaults_group_suffix;
+ const char *save_file = my_defaults_file;
+ char *save_extra_file = my_defaults_extra_file;
+ const char *save_group_suffix = my_defaults_group_suffix;
- if (defaults_file)
+ if (my_defaults_file)
{
- file.assfmt("--defaults-file=%s", defaults_file);
+ file.assfmt("--defaults-file=%s", my_defaults_file);
argv[argc++] = file.c_str();
}
- if (defaults_extra_file)
+ if (my_defaults_extra_file)
{
- extra_file.assfmt("--defaults-extra-file=%s", defaults_extra_file);
+ extra_file.assfmt("--defaults-extra-file=%s", my_defaults_extra_file);
argv[argc++] = extra_file.c_str();
}
- if (defaults_group_suffix)
+ if (my_defaults_group_suffix)
{
- group_suffix.assfmt("--defaults-group-suffix=%s", defaults_group_suffix);
+ group_suffix.assfmt("--defaults-group-suffix=%s",
+ my_defaults_group_suffix);
argv[argc++] = group_suffix.c_str();
}
char ** tmp = (char**)argv;
int ret = load_defaults("my", groups, &argc, &tmp);
- defaults_file = save_file;
- defaults_extra_file = save_extra_file;
- defaults_group_suffix = save_group_suffix;
+ my_defaults_file = save_file;
+ my_defaults_extra_file = save_extra_file;
+ my_defaults_group_suffix = save_group_suffix;
if (ret == 0)
{
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index ebef5510b55..d4a0e4bd142 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -100,6 +100,8 @@ MgmtSrvr::logLevelThread_C(void* m)
extern EventLogger g_eventLogger;
+#ifdef NOT_USED
+
static NdbOut&
operator<<(NdbOut& out, const LogLevel & ll)
{
@@ -109,6 +111,7 @@ operator<<(NdbOut& out, const LogLevel & ll)
out << "]";
return out;
}
+#endif
void
MgmtSrvr::logLevelThreadRun()
@@ -1114,7 +1117,6 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<NodeId> &node_ids,
break;
}
case GSN_STOP_CONF:{
- const StopConf * const ref = CAST_CONSTPTR(StopConf, signal->getDataPtr());
const NodeId nodeId = refToNode(signal->header.theSendersBlockRef);
#ifdef VM_TRACE
ndbout_c("Node %d single user mode", nodeId);
@@ -1144,8 +1146,6 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<NodeId> &node_ids,
break;
}
case GSN_NODE_FAILREP:{
- const NodeFailRep * const rep =
- CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
break;
}
default:
@@ -1333,7 +1333,7 @@ int MgmtSrvr::restartNodes(const Vector<NodeId> &node_ids,
for (unsigned i = 0; i < node_ids.size(); i++)
{
- int result = start(node_ids[i]);
+ start(node_ids[i]);
}
return 0;
}
diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp
index 59f1487f7dc..b9920f099a3 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.hpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.hpp
@@ -49,6 +49,7 @@ class Ndb_mgmd_event_service : public EventLoggerBase
friend class MgmtSrvr;
public:
struct Event_listener : public EventLoggerBase {
+ Event_listener() {}
NDB_SOCKET_TYPE m_socket;
Uint32 m_parsable;
};
diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp
index a2dec949f67..a44fb3969ba 100644
--- a/ndb/src/mgmsrv/Services.cpp
+++ b/ndb/src/mgmsrv/Services.cpp
@@ -645,14 +645,13 @@ MgmApiSession::getConfig_common(Parser_t::Context &,
NdbMutex_Lock(m_mgmsrv.m_configMutex);
const ConfigValues * cfg = &conf->m_configValues->m_config;
- const Uint32 size = cfg->getPackedSize();
UtilBuffer src;
cfg->pack(src);
NdbMutex_Unlock(m_mgmsrv.m_configMutex);
char *tmp_str = (char *) malloc(base64_needed_encoded_length(src.length()));
- int res = base64_encode(src.get_data(), src.length(), tmp_str);
+ (void) base64_encode(src.get_data(), src.length(), tmp_str);
m_output->println("get config reply");
m_output->println("result: Ok");
@@ -835,8 +834,6 @@ MgmApiSession::setClusterLogLevel(Parser<MgmApiSession>::Context &,
const char *reply= "set cluster loglevel reply";
Uint32 node, level, cat;
BaseString errorString;
- SetLogLevelOrd logLevel;
- int result;
DBUG_ENTER("MgmApiSession::setClusterLogLevel");
args.get("node", &node);
args.get("category", &cat);
@@ -883,7 +880,6 @@ MgmApiSession::setLogLevel(Parser<MgmApiSession>::Context &,
Uint32 node = 0, level = 0, cat;
BaseString errorString;
SetLogLevelOrd logLevel;
- int result;
logLevel.clear();
args.get("node", &node);
args.get("category", &cat);
@@ -1312,6 +1308,8 @@ MgmApiSession::setLogFilter(Parser_t::Context &ctx,
m_output->println("");
}
+#ifdef NOT_USED
+
static NdbOut&
operator<<(NdbOut& out, const LogLevel & ll)
{
@@ -1321,6 +1319,7 @@ operator<<(NdbOut& out, const LogLevel & ll)
out << "]";
return out;
}
+#endif
void
Ndb_mgmd_event_service::log(int eventType, const Uint32* theData, NodeId nodeId){
diff --git a/ndb/src/mgmsrv/main.cpp b/ndb/src/mgmsrv/main.cpp
index 76b7ee6f146..80a832196bb 100644
--- a/ndb/src/mgmsrv/main.cpp
+++ b/ndb/src/mgmsrv/main.cpp
@@ -194,7 +194,6 @@ static void usage()
*/
int main(int argc, char** argv)
{
- int mgm_connect_result;
NDB_INIT(argv[0]);
diff --git a/ndb/src/ndbapi/ClusterMgr.hpp b/ndb/src/ndbapi/ClusterMgr.hpp
index 92fe1423f8f..aa303e582c2 100644
--- a/ndb/src/ndbapi/ClusterMgr.hpp
+++ b/ndb/src/ndbapi/ClusterMgr.hpp
@@ -179,6 +179,7 @@ private:
ArbitSignalData data;
NDB_TICKS timestamp;
+ ArbitSignal() {}
inline void init(GlobalSignalNumber aGsn, const Uint32* aData) {
gsn = aGsn;
if (aData != NULL)
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp
index 80bf0315b9c..557586f51b0 100644
--- a/ndb/src/ndbapi/Ndb.cpp
+++ b/ndb/src/ndbapi/Ndb.cpp
@@ -268,8 +268,6 @@ Ndb::waitUntilReady(int timeout)
DBUG_ENTER("Ndb::waitUntilReady");
int secondsCounter = 0;
int milliCounter = 0;
- int noChecksSinceFirstAliveFound = 0;
- int id;
if (theInitState != Initialised) {
// Ndb::init is not called
diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp
index 7986f5d14ba..00b7441a37c 100644
--- a/ndb/src/ndbapi/NdbBlob.cpp
+++ b/ndb/src/ndbapi/NdbBlob.cpp
@@ -388,8 +388,6 @@ NdbBlob::setPartKeyValue(NdbOperation* anOp, Uint32 part)
DBUG_ENTER("NdbBlob::setPartKeyValue");
DBUG_PRINT("info", ("dist=%u part=%u key=", getDistKey(part), part));
DBUG_DUMP("info", theKeyBuf.data, 4 * theTable->m_keyLenInWords);
- Uint32* data = (Uint32*)theKeyBuf.data;
- unsigned size = theTable->m_keyLenInWords;
// TODO use attr ids after compatibility with 4.1.7 not needed
if (anOp->equal("PK", theKeyBuf.data) == -1 ||
anOp->equal("DIST", getDistKey(part)) == -1 ||
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index c622332f11f..2203a2d1c7a 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -1520,11 +1520,6 @@ NdbDictInterface::createOrAlterTable(Ndb & ndb,
tmpTab.MinRowsHigh = (Uint32)(impl.m_min_rows >> 32);
tmpTab.MinRowsLow = (Uint32)(impl.m_min_rows & 0xFFFFFFFF);
- Uint64 maxRows =
- (((Uint64)tmpTab.MaxRowsHigh) << 32) + tmpTab.MaxRowsLow;
- Uint64 minRows =
- (((Uint64)tmpTab.MinRowsHigh) << 32) + tmpTab.MinRowsLow;
-
tmpTab.FragmentType = getKernelConstant(impl.m_fragmentType,
fragmentTypeMapping,
DictTabInfo::AllNodesSmallTable);
diff --git a/ndb/src/ndbapi/NdbIndexOperation.cpp b/ndb/src/ndbapi/NdbIndexOperation.cpp
index 54386e93539..c2231149fbd 100644
--- a/ndb/src/ndbapi/NdbIndexOperation.cpp
+++ b/ndb/src/ndbapi/NdbIndexOperation.cpp
@@ -244,8 +244,6 @@ NdbIndexOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransactionId)
// Simple state is set if start and commit is set and it is
// a read request. Otherwise it is set to zero.
//-------------------------------------------------------------
- Uint8 tReadInd = (theOperationType == ReadRequest);
- Uint8 tSimpleState = tReadInd & tSimpleAlt;
//theNdbCon->theSimpleState = tSimpleState;
tcKeyReq->transId1 = tTransId1;
diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp
index 8e8d01a4252..d4112f0a34b 100644
--- a/ndb/src/ndbapi/NdbOperationDefine.cpp
+++ b/ndb/src/ndbapi/NdbOperationDefine.cpp
@@ -533,8 +533,7 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
}//if
const Uint32 totalSizeInWords = (sizeInBytes + 3)/4; // Including bits in last word
const Uint32 sizeInWords = sizeInBytes / 4; // Excluding bits in last word
- AttributeHeader& ah = AttributeHeader::init(&ahValue, tAttrId,
- totalSizeInWords);
+ (void) AttributeHeader::init(&ahValue, tAttrId, totalSizeInWords);
insertATTRINFO( ahValue );
/***********************************************************************
diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp
index d8e10c04fe8..feff9ed5f36 100644
--- a/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -176,8 +176,6 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
// Simple state is set if start and commit is set and it is
// a read request. Otherwise it is set to zero.
//-------------------------------------------------------------
- Uint8 tReadInd = (theOperationType == ReadRequest);
- Uint8 tSimpleState = tReadInd & tSimpleIndicator;
tcKeyReq->transId1 = tTransId1;
tcKeyReq->transId2 = tTransId2;
diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp
index 8d678117e04..a3e3f7a7a91 100644
--- a/ndb/src/ndbapi/NdbOperationSearch.cpp
+++ b/ndb/src/ndbapi/NdbOperationSearch.cpp
@@ -66,7 +66,6 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
register Uint32 tAttrId;
- Uint32 tData;
Uint32 tKeyInfoPosition;
const char* aValue = aValuePassed;
Uint64 tempData[512];
@@ -346,7 +345,6 @@ NdbOperation::insertKEYINFO(const char* aValue,
Uint32 tEndPos;
Uint32 tPos;
Uint32 signalCounter;
- Uint32 tData;
/*****************************************************************************
* Calculate the end position of the attribute in the key information. *
@@ -513,7 +511,6 @@ NdbOperation::handle_distribution_key(const Uint64* value, Uint32 len)
* Copy distribution key to linear memory
*/
NdbColumnImpl* const * cols = m_accessTable->m_columns.getBase();
- Uint32 len = 0;
Uint64 tmp[1000];
Uint32 chunk = 8;
diff --git a/ndb/src/ndbapi/NdbScanFilter.cpp b/ndb/src/ndbapi/NdbScanFilter.cpp
index 2e9e338d5aa..6ff7485416b 100644
--- a/ndb/src/ndbapi/NdbScanFilter.cpp
+++ b/ndb/src/ndbapi/NdbScanFilter.cpp
@@ -31,6 +31,7 @@
class NdbScanFilterImpl {
public:
+ NdbScanFilterImpl() {}
struct State {
NdbScanFilter::Group m_group;
Uint32 m_popCount;
diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp
index 30046978542..827935b2244 100644
--- a/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -829,7 +829,6 @@ NdbScanOperation::doSendScan(int aProcessorId)
tSignal = theSCAN_TABREQ;
Uint32 tupKeyLen = theTupKeyLen;
- Uint32 len = theTotalNrOfKeyWordInSignal;
Uint32 aTC_ConnectPtr = theNdbCon->theTCConPtr;
Uint64 transId = theNdbCon->theTransactionId;
@@ -1299,8 +1298,6 @@ NdbIndexScanOperation::fix_get_values(){
Uint32 cnt = m_accessTable->getNoOfColumns() - 1;
assert(cnt < NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY);
- const NdbIndexImpl * idx = m_accessTable->m_index;
- const NdbTableImpl * tab = m_currentTable;
for(Uint32 i = 0; i<cnt; i++){
Uint32 val = theTupleKeyDefined[i][0];
switch(val){
diff --git a/ndb/src/ndbapi/SignalSender.cpp b/ndb/src/ndbapi/SignalSender.cpp
index 1ed42c9c610..3d757816751 100644
--- a/ndb/src/ndbapi/SignalSender.cpp
+++ b/ndb/src/ndbapi/SignalSender.cpp
@@ -172,6 +172,7 @@ SignalSender::waitFor(Uint32 timeOutMillis, T & t)
class WaitForAny {
public:
+ WaitForAny() {}
SimpleSignal * check(Vector<SimpleSignal*> & m_jobBuffer){
if(m_jobBuffer.size() > 0){
SimpleSignal * s = m_jobBuffer[0];
@@ -191,6 +192,7 @@ SignalSender::waitFor(Uint32 timeOutMillis){
class WaitForNode {
public:
+ WaitForNode() {}
Uint32 m_nodeId;
SimpleSignal * check(Vector<SimpleSignal*> & m_jobBuffer){
Uint32 len = m_jobBuffer.size();
diff --git a/ndb/src/ndbapi/ndb_cluster_connection.cpp b/ndb/src/ndbapi/ndb_cluster_connection.cpp
index 467522aecd8..1e3b678de53 100644
--- a/ndb/src/ndbapi/ndb_cluster_connection.cpp
+++ b/ndb/src/ndbapi/ndb_cluster_connection.cpp
@@ -515,7 +515,6 @@ int Ndb_cluster_connection::connect(int no_retries, int retry_delay_in_seconds,
struct ndb_mgm_reply mgm_reply;
DBUG_ENTER("Ndb_cluster_connection::connect");
- const char* error = 0;
do {
if (m_impl.m_config_retriever == 0)
DBUG_RETURN(-1);