1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix gcc 7.3 compiler warnings.

This commit is contained in:
Oleksandr Byelkin
2018-08-03 14:37:55 +02:00
parent 9d42eb5e28
commit 701f0b8e36
7 changed files with 27 additions and 8 deletions

View File

@ -7307,7 +7307,8 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
param->current_table);
#ifdef HAVE_SPATIAL
Field::geometry_type sav_geom_type;
if (field_item->field->type() == MYSQL_TYPE_GEOMETRY)
const bool geometry= field_item->field->type() == MYSQL_TYPE_GEOMETRY;
if (geometry)
{
sav_geom_type= ((Field_geom*) field_item->field)->geom_type;
/* We have to be able to store all sorts of spatial features here */
@ -7342,7 +7343,7 @@ SEL_TREE *Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM *param,
}
#ifdef HAVE_SPATIAL
if (field_item->field->type() == MYSQL_TYPE_GEOMETRY)
if (geometry)
{
((Field_geom*) field_item->field)->geom_type= sav_geom_type;
}