Skip to content

Commit 670bd1d

Browse files
committed
Bug#25943754: FIX GCC 7 COMPILE WARNINGS
Fix new compilation warnings reported by GCC 7.
1 parent 95252dd commit 670bd1d

File tree

18 files changed

+27
-13
lines changed

18 files changed

+27
-13
lines changed

client/mysqlbinlog.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,7 @@ static Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *
12541254
goto end;
12551255
}
12561256
}
1257+
// Fall through
12571258
case binary_log::ROWS_QUERY_LOG_EVENT:
12581259
case binary_log::WRITE_ROWS_EVENT:
12591260
case binary_log::DELETE_ROWS_EVENT:

libbinlogevents/src/statement_events.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -539,8 +539,8 @@ User_var_event(const char* buf, unsigned int event_len,
539539
(description_event->footer()->checksum_alg ==
540540
BINLOG_CHECKSUM_ALG_OFF));
541541
size_t data_written= (header()->data_written- checksum_verify);
542-
BAPI_ASSERT(((bytes_read == data_written) ? 0 : BINLOG_CHECKSUM_LEN)||
543-
((bytes_read == data_written - 1) ? 0 : BINLOG_CHECKSUM_LEN));
542+
BAPI_ASSERT(((bytes_read == data_written) ? false : true) ||
543+
((bytes_read == data_written - 1) ? false : true));
544544
#endif
545545
if ((header()->data_written - bytes_read) > 0)
546546
{

rapid/plugin/x/mysqlxtest_src/common/utils_mysql_parsing.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
33
*
44
* This program is free software; you can redistribute it and/or
55
* modify it under the terms of the GNU General Public License as
@@ -118,8 +118,8 @@ namespace shcore
118118
if (!is_hidden_command && !have_content)
119119
head = tail; // Skip over the comment.
120120

121-
break;
122121
}
122+
break;
123123

124124
case '-': // Possible single line comment.
125125
{

sql/opt_sum.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,6 +1140,7 @@ static bool maxmin_in_range(bool max_fl, Item_field *item_field, Item *cond)
11401140
case Item_func::LT_FUNC:
11411141
case Item_func::LE_FUNC:
11421142
less_fl= true;
1143+
// Fall through
11431144
case Item_func::GT_FUNC:
11441145
case Item_func::GE_FUNC:
11451146
{

sql/sp.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,6 +2653,7 @@ String *sp_get_item_value(THD *thd, Item *item, String *str)
26532653
if (item->data_type() != MYSQL_TYPE_BIT)
26542654
return item->val_str(str);
26552655
else {/* Bit type is handled as binary string */}
2656+
// Fall through
26562657
case STRING_RESULT:
26572658
{
26582659
String *result= item->val_str(str);

sql/sql_parse.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3345,6 +3345,7 @@ mysql_execute_command(THD *thd, bool first_level)
33453345
DBUG_PRINT("debug", ("Just after generate_incident()"));
33463346
}
33473347
#endif
3348+
// Fall through
33483349
case SQLCOM_INSERT:
33493350
case SQLCOM_REPLACE_SELECT:
33503351
case SQLCOM_INSERT_SELECT:

sql/sql_show.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ class Show_create_error_handler : public Internal_error_handler
661661
is_handled= false;
662662
break;
663663
}
664+
// Fall through
664665
case ER_COLUMNACCESS_DENIED_ERROR:
665666
// ER_VIEW_NO_EXPLAIN cannot happen here.
666667
case ER_PROCACCESS_DENIED_ERROR:

storage/federated/ha_federated.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,8 +1441,8 @@ bool ha_federated::create_where_from_key(String *to,
14411441
{
14421442
goto err;
14431443
}
1444-
break;
14451444
}
1445+
break;
14461446
case HA_READ_KEY_OR_NEXT:
14471447
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_NEXT %d", i));
14481448
if (emit_key_part_name(&tmp, key_part) ||
@@ -1460,8 +1460,8 @@ bool ha_federated::create_where_from_key(String *to,
14601460
emit_key_part_element(&tmp, key_part, needs_quotes, 0, ptr,
14611461
part_length))
14621462
goto err;
1463-
break;
14641463
}
1464+
break;
14651465
case HA_READ_KEY_OR_PREV:
14661466
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_PREV %d", i));
14671467
if (emit_key_part_name(&tmp, key_part) ||

storage/innobase/data/data0type.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ dtype_print(
222222

223223
case DATA_VAR_POINT:
224224
fputs("DATA_VAR_POINT", stderr);
225+
break;
225226

226227
case DATA_GEOMETRY:
227228
fputs("DATA_GEOMETRY", stderr);

storage/innobase/fil/fil0fil.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8753,6 +8753,7 @@ fil_tablespace_name_recover(
87538753
case MLOG_FILE_CREATE2:
87548754

87558755
ut_a(page_id.space() != TRX_SYS_SPACE);
8756+
// Fall through.
87568757

87578758
case MLOG_FILE_OPEN:
87588759

0 commit comments

Comments
 (0)