summaryrefslogtreecommitdiff
path: root/sql/spatial.h
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@sun.com>2010-05-26 16:12:23 +0200
committerTor Didriksen <tor.didriksen@sun.com>2010-05-26 16:12:23 +0200
commitd8536dfbddbf98df10081bdbf83b2c06cf9d01c1 (patch)
treee02f9ec4f4f64535006e2aeecf1ec1497146b50c /sql/spatial.h
parent33e9d05c086a54ec0cd3860acdc01585e0d4fda6 (diff)
downloadmariadb-git-d8536dfbddbf98df10081bdbf83b2c06cf9d01c1.tar.gz
Bug #53445 Build with -Wall and fix warnings that it generates
Add -Wall to gcc/g++ Fix most warnings reported in dbg and opt mode.
Diffstat (limited to 'sql/spatial.h')
-rw-r--r--sql/spatial.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/spatial.h b/sql/spatial.h
index a4bce47d0e5..aabbb7a1b97 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -267,14 +267,7 @@ public:
virtual int geometry_n(uint32 num, String *result) const { return -1; }
public:
- static Geometry *create_by_typeid(Geometry_buffer *buffer, int type_id)
- {
- Class_info *ci;
- if (!(ci= find_class((int) type_id)))
- return NULL;
- (*ci->m_create_func)((void *)buffer);
- return my_reinterpret_cast(Geometry *)(buffer);
- }
+ static Geometry *create_by_typeid(Geometry_buffer *buffer, int type_id);
static Geometry *construct(Geometry_buffer *buffer,
const char *data, uint32 data_len);
@@ -532,10 +525,9 @@ public:
const Class_info *get_class_info() const;
};
-const int geometry_buffer_size= sizeof(Gis_point);
struct Geometry_buffer
{
- void *arr[(geometry_buffer_size - 1)/sizeof(void *) + 1];
+ Aligned_char_array<sizeof(Gis_point)> buf;
};
#endif /*HAVE_SPATAIAL*/