summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2006-03-29 17:04:00 +0300
committerunknown <monty@mysql.com>2006-03-29 17:04:00 +0300
commit8ac1d552861a673bb01b5deb5c9009c312494149 (patch)
tree3996c6060eb4637b4c7cd6abca72920ec567a9fb /storage
parent59eaf292de3ab637be34fb5199da98a6192fa650 (diff)
downloadmariadb-git-8ac1d552861a673bb01b5deb5c9009c312494149.tar.gz
Remove compiler warnings
Add missing DBUG_RETURN Fixed stack overflow in NdbBlob (found by ndb_gis.test) Fixed access to freed memory in ndb_cluster_real_free_share() mysys/mf_keycache.c: Add missing DBUG_RETURN sql/ha_ndbcluster.cc: Move free_root to after share handling, as otherwise we will free things needed by free_table_share() sql/item_func.cc: Add missing DBUG_RETURN sql/item_strfunc.cc: Add missing DBUG_RETURN sql/sp_head.cc: Add missing DBUG_RETURN sql/sql_base.cc: Add missing DBUG_RETURN storage/csv/ha_tina.cc: Add missing DBUG_RETURN storage/myisam/mi_key.c: Add missing DBUG_RETURN storage/myisam/mi_keycache.c: Add missing DBUG_RETURN storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp: Remove compiler warning storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Remove compiler warning storage/ndb/include/transporter/TransporterDefinitions.hpp: Remove compiler warning storage/ndb/include/util/SimpleProperties.hpp: Remove compiler warning storage/ndb/include/util/SocketServer.hpp: Remove compiler warning storage/ndb/src/ndbapi/ClusterMgr.hpp: Remove compiler warning storage/ndb/src/ndbapi/NdbBlob.cpp: Fix stack overflow storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp: Remove compiler warning storage/ndb/src/ndbapi/NdbScanOperation.cpp: Remove compiler warning
Diffstat (limited to 'storage')
-rw-r--r--storage/csv/ha_tina.cc5
-rw-r--r--storage/myisam/mi_key.c2
-rw-r--r--storage/myisam/mi_keycache.c1
-rw-r--r--storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp3
-rw-r--r--storage/ndb/include/kernel/signaldata/DictTabInfo.hpp5
-rw-r--r--storage/ndb/include/transporter/TransporterDefinitions.hpp1
-rw-r--r--storage/ndb/include/util/SimpleProperties.hpp1
-rw-r--r--storage/ndb/include/util/SocketServer.hpp1
-rw-r--r--storage/ndb/src/ndbapi/ClusterMgr.hpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbBlob.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp1
-rw-r--r--storage/ndb/src/ndbapi/NdbScanOperation.cpp2
12 files changed, 21 insertions, 5 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 066a3011381..ecc51ad2302 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -981,12 +981,13 @@ int ha_tina::rnd_end()
int ha_tina::delete_all_rows()
{
+ int rc;
DBUG_ENTER("ha_tina::delete_all_rows");
if (!records_is_known)
- return (my_errno=HA_ERR_WRONG_COMMAND);
+ DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND);
- int rc= my_chsize(share->data_file, 0, 0, MYF(MY_WME));
+ rc= my_chsize(share->data_file, 0, 0, MYF(MY_WME));
if (get_mmap(share, 0) > 0)
DBUG_RETURN(-1);
diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c
index 5dcc99d41b4..f8463a0b6b0 100644
--- a/storage/myisam/mi_key.c
+++ b/storage/myisam/mi_key.c
@@ -64,7 +64,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key,
TODO: nulls processing
*/
#ifdef HAVE_SPATIAL
- return sp_make_key(info,keynr,key,record,filepos);
+ DBUG_RETURN(sp_make_key(info,keynr,key,record,filepos));
#else
DBUG_ASSERT(0); /* mi_open should check that this never happens*/
#endif
diff --git a/storage/myisam/mi_keycache.c b/storage/myisam/mi_keycache.c
index fb13f3703a2..b4122089d1d 100644
--- a/storage/myisam/mi_keycache.c
+++ b/storage/myisam/mi_keycache.c
@@ -159,4 +159,5 @@ void mi_change_key_cache(KEY_CACHE *old_key_cache,
*/
multi_key_cache_change(old_key_cache, new_key_cache);
pthread_mutex_unlock(&THR_LOCK_myisam);
+ DBUG_VOID_RETURN;
}
diff --git a/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp b/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp
index 34b73644a13..2c4c60c1875 100644
--- a/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp
+++ b/storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp
@@ -35,6 +35,8 @@ public:
STATIC_CONST( DataLength = 2 );
STATIC_CONST( TextLength = DataLength * 8 ); // hex digits
+ ArbitTicket() {}
+
inline void clear() {
data[0] = 0;
data[1] = 0;
@@ -145,6 +147,7 @@ public:
STATIC_CONST( SignalLength = 3 + ArbitTicket::DataLength + NodeBitmask::Size );
+ ArbitSignalData() {}
inline bool match(ArbitSignalData& aData) const {
return
node == aData.node &&
diff --git a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
index 5c0781944c3..6997938472c 100644
--- a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
+++ b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
@@ -336,6 +336,7 @@ public:
Uint32 RowGCIFlag;
Uint32 RowChecksumFlag;
+ Table() {}
void init();
};
@@ -398,6 +399,7 @@ public:
Uint32 AttributeStorageType;
char AttributeDefaultValue[MAX_ATTR_DEFAULT_VALUE_SIZE];
+ Attribute() {}
void init();
inline
@@ -685,6 +687,7 @@ struct DictFilegroupInfo {
//GrowSpec LF_RedoGrow;
Uint32 LF_UndoFreeWordsHi;
Uint32 LF_UndoFreeWordsLo;
+ Filegroup() {}
void init();
};
static const Uint32 MappingSize;
@@ -700,6 +703,8 @@ struct DictFilegroupInfo {
Uint32 FileSizeHi;
Uint32 FileSizeLo;
Uint32 FileFreeExtents;
+
+ File() {}
void init();
};
static const Uint32 FileMappingSize;
diff --git a/storage/ndb/include/transporter/TransporterDefinitions.hpp b/storage/ndb/include/transporter/TransporterDefinitions.hpp
index e9c5ffa2c80..f7b5431bda0 100644
--- a/storage/ndb/include/transporter/TransporterDefinitions.hpp
+++ b/storage/ndb/include/transporter/TransporterDefinitions.hpp
@@ -117,6 +117,7 @@ struct SegmentedSectionPtr {
Uint32 i;
struct SectionSegment * p;
+ SegmentedSectionPtr() {}
void setNull() { p = 0;}
bool isNull() const { return p == 0;}
};
diff --git a/storage/ndb/include/util/SimpleProperties.hpp b/storage/ndb/include/util/SimpleProperties.hpp
index d64348145b8..bae91108518 100644
--- a/storage/ndb/include/util/SimpleProperties.hpp
+++ b/storage/ndb/include/util/SimpleProperties.hpp
@@ -166,6 +166,7 @@ public:
*/
class Writer {
public:
+ Writer() {}
virtual ~Writer() {}
bool first();
diff --git a/storage/ndb/include/util/SocketServer.hpp b/storage/ndb/include/util/SocketServer.hpp
index 4c37e63adf0..e131b78baa1 100644
--- a/storage/ndb/include/util/SocketServer.hpp
+++ b/storage/ndb/include/util/SocketServer.hpp
@@ -60,6 +60,7 @@ public:
*/
class Service {
public:
+ Service() {}
virtual ~Service(){}
/**
diff --git a/storage/ndb/src/ndbapi/ClusterMgr.hpp b/storage/ndb/src/ndbapi/ClusterMgr.hpp
index eacdac9512e..31682885f90 100644
--- a/storage/ndb/src/ndbapi/ClusterMgr.hpp
+++ b/storage/ndb/src/ndbapi/ClusterMgr.hpp
@@ -179,6 +179,8 @@ private:
ArbitSignalData data;
NDB_TICKS timestamp;
+ ArbitSignal() {}
+
inline void init(GlobalSignalNumber aGsn, const Uint32* aData) {
gsn = aGsn;
if (aData != NULL)
diff --git a/storage/ndb/src/ndbapi/NdbBlob.cpp b/storage/ndb/src/ndbapi/NdbBlob.cpp
index 2b655a3dc0e..51e038882cd 100644
--- a/storage/ndb/src/ndbapi/NdbBlob.cpp
+++ b/storage/ndb/src/ndbapi/NdbBlob.cpp
@@ -195,7 +195,7 @@ NdbBlob::getBlobEvent(NdbEventImpl& be, const NdbEventImpl* e, const NdbColumnIm
assert(c->m_blobTable != NULL);
const NdbTableImpl& bt = *c->m_blobTable;
// blob event name
- char bename[NdbBlobImpl::BlobTableNameSize];
+ char bename[MAX_TAB_NAME_SIZE];
getBlobEventName(bename, e, c);
be.setName(bename);
be.setTable(bt);
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
index 044ac58ade1..bffc2174be5 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
@@ -51,6 +51,7 @@ struct EventBufData
EventBufData *m_next_hash; // Next in per-GCI hash
Uint32 m_pkhash; // PK hash (without op) for fast compare
+ EventBufData() {}
// Get blob part number from blob data
Uint32 get_blob_part_no() {
assert(ptr[0].sz > 2);
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
index ad80d2e7c0c..ea7fbe4077d 100644
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -169,7 +169,7 @@ NdbScanOperation::readTuples(NdbScanOperation::LockMode lm,
{ char* p = getenv("NDB_USE_TUPSCAN");
if (p != 0) {
unsigned n = atoi(p); // 0-10
- if (::time(0) % 10 < n) tupScan = true;
+ if ((unsigned int) (::time(0) % 10) < n) tupScan = true;
}
}
#endif