Skip to content

Commit

Permalink
MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
Browse files Browse the repository at this point in the history
10.0 part of the fix
  • Loading branch information
vuvova committed Mar 21, 2016
1 parent 98ea806 commit 22ebf3c
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion storage/innobase/fts/fts0fts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6274,7 +6274,7 @@ fts_fake_hex_to_dec(
#ifdef _WIN32
ret = sscanf(tmp_id, "%016llu", &dec_id);
#else
ret = sscanf(tmp_id, "%016"PRIu64, &dec_id);
ret = sscanf(tmp_id, "%016" PRIu64, &dec_id);
#endif /* _WIN32 */
ut_ad(ret == 1);

Expand Down
4 changes: 2 additions & 2 deletions storage/innobase/include/fts0priv.ic
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fts_write_object_id(
/* Use this to construct old(5.6.14 and 5.7.3) windows
ambiguous aux table names */
DBUG_EXECUTE_IF("innodb_test_wrong_windows_fts_aux_table_name",
return(sprintf(str, "%016"PRIu64, id)););
return(sprintf(str, "%016" PRIu64, id)););

DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name",
return(sprintf(str, UINT64PFx, id)););
Expand All @@ -66,7 +66,7 @@ fts_write_object_id(
// FIXME: Use ut_snprintf(), so does following one.
return(sprintf(str, "%016llu", id));
#else /* _WIN32 */
return(sprintf(str, "%016"PRIu64, id));
return(sprintf(str, "%016" PRIu64, id));
#endif /* _WIN32 */
}

Expand Down
8 changes: 4 additions & 4 deletions storage/mroonga/mrn_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length,
#define MRN_PARAM_STR(title_name, param_name) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info", ("mroonga "title_name" start")); \
DBUG_PRINT("info", ("mroonga " title_name " start")); \
if (!share->param_name) \
{ \
if ((share->param_name = mrn_get_string_between_quote( \
Expand All @@ -284,15 +284,15 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length,
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info", ("mroonga "title_name"=%s", share->param_name)); \
DBUG_PRINT("info", ("mroonga " title_name "=%s", share->param_name)); \
} \
break; \
}

#define MRN_PARAM_STR_LIST(title_name, param_name, param_pos) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info", ("mroonga "title_name" start")); \
DBUG_PRINT("info", ("mroonga " title_name " start")); \
if (share->param_name && !share->param_name[param_pos]) \
{ \
if ((share->param_name[param_pos] = mrn_get_string_between_quote( \
Expand All @@ -305,7 +305,7 @@ void mrn_get_partition_info(const char *table_name, uint table_name_length,
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info", ("mroonga "title_name"[%d]=%s", param_pos, \
DBUG_PRINT("info", ("mroonga " title_name "[%d]=%s", param_pos, \
share->param_name[param_pos])); \
} \
break; \
Expand Down
6 changes: 3 additions & 3 deletions storage/oqgraph/graphcore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1036,11 +1036,11 @@ int stack_cursor::fetch_row(const row &row_info, row &result,
optional<EdgeWeight> w;
optional<Vertex> v;
result= row_info;
if ((result.seq_indicator= seq= last.sequence()))
if ((result.seq_indicator= static_cast<bool>(seq= last.sequence())))
result.seq= *seq;
if ((result.link_indicator= v= last.vertex()))
if ((result.link_indicator= static_cast<bool>(v= last.vertex())))
result.link= get(boost::vertex_index, share->g, *v);
if ((result.weight_indicator= w= last.weight()))
if ((result.weight_indicator= static_cast<bool>(w= last.weight())))
result.weight= *w;
return oqgraph::OK;
}
Expand Down
20 changes: 10 additions & 10 deletions storage/spider/spd_copy_tables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int spider_udf_set_copy_tables_param_default(
#define SPIDER_PARAM_STR(title_name, param_name) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (!copy_tables->param_name) \
{ \
if ((copy_tables->param_name = spider_get_string_between_quote( \
Expand All @@ -94,14 +94,14 @@ int spider_udf_set_copy_tables_param_default(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%s", copy_tables->param_name)); \
DBUG_PRINT("info",("spider " title_name "=%s", copy_tables->param_name)); \
} \
break; \
}
#define SPIDER_PARAM_HINT_WITH_MAX(title_name, param_name, check_length, max_size, min_val, max_val) \
if (!strncasecmp(tmp_ptr, title_name, check_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
DBUG_PRINT("info",("spider max_size=%d", max_size)); \
int hint_num = atoi(tmp_ptr + check_length) - 1; \
DBUG_PRINT("info",("spider hint_num=%d", hint_num)); \
Expand Down Expand Up @@ -131,7 +131,7 @@ int spider_udf_set_copy_tables_param_default(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"[%d]=%d", hint_num, \
DBUG_PRINT("info",("spider " title_name "[%d]=%d", hint_num, \
copy_tables->param_name[hint_num])); \
} else { \
error_num = ER_SPIDER_INVALID_UDF_PARAM_NUM; \
Expand All @@ -144,7 +144,7 @@ int spider_udf_set_copy_tables_param_default(
#define SPIDER_PARAM_INT_WITH_MAX(title_name, param_name, min_val, max_val) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (copy_tables->param_name == -1) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
Expand All @@ -161,14 +161,14 @@ int spider_udf_set_copy_tables_param_default(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%d", copy_tables->param_name)); \
DBUG_PRINT("info",("spider " title_name "=%d", copy_tables->param_name)); \
} \
break; \
}
#define SPIDER_PARAM_INT(title_name, param_name, min_val) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (copy_tables->param_name == -1) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
Expand All @@ -183,14 +183,14 @@ int spider_udf_set_copy_tables_param_default(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%d", copy_tables->param_name)); \
DBUG_PRINT("info",("spider " title_name "=%d", copy_tables->param_name)); \
} \
break; \
}
#define SPIDER_PARAM_LONGLONG(title_name, param_name, min_val) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (copy_tables->param_name == -1) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
Expand All @@ -206,7 +206,7 @@ int spider_udf_set_copy_tables_param_default(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%lld", \
DBUG_PRINT("info",("spider " title_name "=%lld", \
copy_tables->param_name)); \
} \
break; \
Expand Down
20 changes: 10 additions & 10 deletions storage/spider/spd_direct_sql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ int spider_udf_direct_sql_get_server(
#define SPIDER_PARAM_STR(title_name, param_name) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (!direct_sql->param_name) \
{ \
if ((direct_sql->param_name = spider_get_string_between_quote( \
Expand All @@ -909,14 +909,14 @@ int spider_udf_direct_sql_get_server(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%s", direct_sql->param_name)); \
DBUG_PRINT("info",("spider " title_name "=%s", direct_sql->param_name)); \
} \
break; \
}
#define SPIDER_PARAM_HINT_WITH_MAX(title_name, param_name, check_length, max_size, min_val, max_val) \
if (!strncasecmp(tmp_ptr, title_name, check_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
DBUG_PRINT("info",("spider max_size=%d", max_size)); \
int hint_num = atoi(tmp_ptr + check_length) - 1; \
DBUG_PRINT("info",("spider hint_num=%d", hint_num)); \
Expand Down Expand Up @@ -946,7 +946,7 @@ int spider_udf_direct_sql_get_server(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"[%d]=%d", hint_num, \
DBUG_PRINT("info",("spider " title_name "[%d]=%d", hint_num, \
direct_sql->param_name[hint_num])); \
} else { \
error_num = ER_SPIDER_INVALID_CONNECT_INFO_NUM; \
Expand All @@ -959,7 +959,7 @@ int spider_udf_direct_sql_get_server(
#define SPIDER_PARAM_INT_WITH_MAX(title_name, param_name, min_val, max_val) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (direct_sql->param_name == -1) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
Expand All @@ -976,15 +976,15 @@ int spider_udf_direct_sql_get_server(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%d", \
DBUG_PRINT("info",("spider " title_name "=%d", \
(int) direct_sql->param_name)); \
} \
break; \
}
#define SPIDER_PARAM_INT(title_name, param_name, min_val) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (direct_sql->param_name == -1) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
Expand All @@ -999,14 +999,14 @@ int spider_udf_direct_sql_get_server(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%d", direct_sql->param_name)); \
DBUG_PRINT("info",("spider " title_name "=%d", direct_sql->param_name)); \
} \
break; \
}
#define SPIDER_PARAM_LONGLONG(title_name, param_name, min_val) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider "title_name" start")); \
DBUG_PRINT("info",("spider " title_name " start")); \
if (direct_sql->param_name == -1) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
Expand All @@ -1022,7 +1022,7 @@ int spider_udf_direct_sql_get_server(
MYF(0), tmp_ptr); \
goto error; \
} \
DBUG_PRINT("info",("spider "title_name"=%lld", \
DBUG_PRINT("info",("spider " title_name "=%lld", \
direct_sql->param_name)); \
} \
break; \
Expand Down
Loading

0 comments on commit 22ebf3c

Please sign in to comment.