Skip to content

Commit

Permalink
MDEV-6275: Use a non-narrowing conversion
Browse files Browse the repository at this point in the history
On 32-bit systems, sizeof(uint)==sizeof(long).
The C++11 narrowing cast would issue a warning due to the sign mismatch.
  • Loading branch information
dr-m committed Jun 14, 2019
1 parent 2cd45ad commit e5fab61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/spider/spd_db_mysql.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ int spider_db_mbase::connect(
} else if (!strcmp(tgt_host, "127.0.0.1") ||
!strcmp(tgt_host, glob_hostname))
{
if (tgt_port == long{*spd_mysqld_port})
if (tgt_port == (long) *spd_mysqld_port)
{
my_printf_error(ER_SPIDER_SAME_SERVER_LINK_NUM,
ER_SPIDER_SAME_SERVER_LINK_STR2, MYF(0),
Expand Down

0 comments on commit e5fab61

Please sign in to comment.