MDEV-13459 Warnings, when compiling with gcc-7.x

mostly caused by -Wimplicit-fallthrough
This commit is contained in:
Sergei Golubchik 2017-09-16 14:52:42 +02:00
parent 3b7aa3017b
commit d76f5774fe
53 changed files with 170 additions and 124 deletions

View File

@ -1080,7 +1080,7 @@ static ulong start_timer(void);
static void end_timer(ulong start_time,char *buff); static void end_timer(ulong start_time,char *buff);
static void mysql_end_timer(ulong start_time,char *buff); static void mysql_end_timer(ulong start_time,char *buff);
static void nice_time(double sec,char *buff,bool part_second); static void nice_time(double sec,char *buff,bool part_second);
extern "C" sig_handler mysql_end(int sig); extern "C" sig_handler mysql_end(int sig) __attribute__ ((noreturn));
extern "C" sig_handler handle_sigint(int sig); extern "C" sig_handler handle_sigint(int sig);
#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL) #if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
static sig_handler window_resize(int sig); static sig_handler window_resize(int sig);

View File

@ -2012,6 +2012,7 @@ static void print_xml_comment(FILE *xml_file, size_t len,
case '-': case '-':
if (*(comment_string + 1) == '-') /* Only one hyphen allowed. */ if (*(comment_string + 1) == '-') /* Only one hyphen allowed. */
break; break;
/* fall through */
default: default:
fputc(*comment_string, xml_file); fputc(*comment_string, xml_file);
break; break;

View File

@ -97,12 +97,16 @@ static struct my_option my_long_options[] =
}; };
static void usage(my_bool version) static void version()
{ {
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE);
MACHINE_TYPE); }
if (version)
return;
static void usage() __attribute__ ((noreturn));
static void usage()
{
version();
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Prints all arguments that is give to some program using the default files"); puts("Prints all arguments that is give to some program using the default files");
printf("Usage: %s [OPTIONS] [groups]\n", my_progname); printf("Usage: %s [OPTIONS] [groups]\n", my_progname);
@ -126,12 +130,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
exit(0); exit(0);
case 'I': case 'I':
case '?': case '?':
usage(0); usage();
case 'v': case 'v':
verbose++; verbose++;
break; break;
case 'V': case 'V':
usage(1); version();
/* fall through */
case '#': case '#':
DBUG_PUSH(argument ? argument : default_dbug_option); DBUG_PUSH(argument ? argument : default_dbug_option);
break; break;
@ -179,7 +184,7 @@ int main(int argc, char **argv)
nargs+= array_elements(mysqld_groups); nargs+= array_elements(mysqld_groups);
if (nargs < 2) if (nargs < 2)
usage(0); usage();
load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME)); load_default_groups=(char**) my_malloc(nargs*sizeof(char*), MYF(MY_WME));
if (!load_default_groups) if (!load_default_groups)

View File

@ -174,6 +174,7 @@ register char **argv[];
break; break;
case 'V': case 'V':
version=1; version=1;
/* fall through */
case 'I': case 'I':
case '?': case '?':
help=1; /* Help text written */ help=1; /* Help text written */

View File

@ -47,6 +47,11 @@ void* operator new[](std::size_t sz, const std::nothrow_t&) throw()
return (void *) my_malloc (sz ? sz : 1, MYF(0)); return (void *) my_malloc (sz ? sz : 1, MYF(0));
} }
void operator delete (void *ptr, std::size_t)
{
my_free(ptr);
}
void operator delete (void *ptr) void operator delete (void *ptr)
{ {
my_free(ptr); my_free(ptr);
@ -57,6 +62,11 @@ void operator delete[] (void *ptr) throw ()
my_free(ptr); my_free(ptr);
} }
void operator delete[] (void *ptr, std::size_t) throw ()
{
my_free(ptr);
}
void operator delete(void* ptr, const std::nothrow_t&) throw() void operator delete(void* ptr, const std::nothrow_t&) throw()
{ {
my_free(ptr); my_free(ptr);

View File

@ -10,6 +10,12 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
ENDIF() ENDIF()
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(" -Wdeprecated-declarations" HAVE_CXX_WDEPRECATED_DECLARATIONS)
IF (HAVE_CXX_WDEPRECATED_DECLARATIONS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
ENDIF()
INCLUDE_DIRECTORIES(libhsclient) INCLUDE_DIRECTORIES(libhsclient)
# Handlersocket client library. We do not distribute it, # Handlersocket client library. We do not distribute it,

View File

@ -1276,6 +1276,7 @@ void mysql_read_default_options(struct st_mysql_options *options,
break; break;
case OPT_pipe: case OPT_pipe:
options->protocol = MYSQL_PROTOCOL_PIPE; options->protocol = MYSQL_PROTOCOL_PIPE;
break;
case OPT_connect_timeout: case OPT_connect_timeout:
case OPT_timeout: case OPT_timeout:
if (opt_arg) if (opt_arg)

View File

@ -185,8 +185,8 @@ common_1_lev_code:
expr= tmp_expr - (tmp_expr/60)*60; expr= tmp_expr - (tmp_expr/60)*60;
/* the code after the switch will finish */ /* the code after the switch will finish */
}
break; break;
}
case INTERVAL_HOUR_SECOND: case INTERVAL_HOUR_SECOND:
{ {
ulonglong tmp_expr= expr; ulonglong tmp_expr= expr;
@ -202,8 +202,8 @@ common_1_lev_code:
expr= tmp_expr - (tmp_expr/60)*60; expr= tmp_expr - (tmp_expr/60)*60;
/* the code after the switch will finish */ /* the code after the switch will finish */
}
break; break;
}
case INTERVAL_DAY_SECOND: case INTERVAL_DAY_SECOND:
{ {
ulonglong tmp_expr= expr; ulonglong tmp_expr= expr;
@ -225,8 +225,8 @@ common_1_lev_code:
expr= tmp_expr - (tmp_expr/60)*60; expr= tmp_expr - (tmp_expr/60)*60;
/* the code after the switch will finish */ /* the code after the switch will finish */
}
break; break;
}
case INTERVAL_DAY_MICROSECOND: case INTERVAL_DAY_MICROSECOND:
case INTERVAL_HOUR_MICROSECOND: case INTERVAL_HOUR_MICROSECOND:
case INTERVAL_MINUTE_MICROSECOND: case INTERVAL_MINUTE_MICROSECOND:
@ -240,6 +240,8 @@ common_1_lev_code:
break; break;
case INTERVAL_WEEK: case INTERVAL_WEEK:
expr/= 7; expr/= 7;
close_quote= FALSE;
break;
default: default:
close_quote= FALSE; close_quote= FALSE;
break; break;

View File

@ -9218,7 +9218,7 @@ bool Create_field::init(THD *thd, char *fld_name, enum_field_types fld_type,
case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATE:
/* We don't support creation of MYSQL_TYPE_DATE anymore */ /* We don't support creation of MYSQL_TYPE_DATE anymore */
sql_type= MYSQL_TYPE_NEWDATE; sql_type= MYSQL_TYPE_NEWDATE;
/* fall trough */ /* fall through */
case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_NEWDATE:
length= MAX_DATE_WIDTH; length= MAX_DATE_WIDTH;
break; break;

View File

@ -7331,6 +7331,7 @@ void ha_partition::print_error(int error, myf errflag)
m_err_rec= NULL; m_err_rec= NULL;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
/* fall through */
default: default:
{ {
if (!(thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION)) if (!(thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION))

View File

@ -6004,7 +6004,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
collation.collation); collation.collation);
break; break;
} }
/* Fall through to make_string_field() */ /* fall through */
case MYSQL_TYPE_ENUM: case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET: case MYSQL_TYPE_SET:
case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_VAR_STRING:

View File

@ -863,6 +863,7 @@ void Item_func_num1::fix_length_and_dec()
break; break;
case TIME_RESULT: case TIME_RESULT:
cached_result_type= DECIMAL_RESULT; cached_result_type= DECIMAL_RESULT;
/* fall through */
case DECIMAL_RESULT: case DECIMAL_RESULT:
decimals= args[0]->decimal_scale(); // Do not preserve NOT_FIXED_DEC decimals= args[0]->decimal_scale(); // Do not preserve NOT_FIXED_DEC
max_length= args[0]->max_length; max_length= args[0]->max_length;
@ -2038,6 +2039,7 @@ my_decimal *Item_func_mod::decimal_op(my_decimal *decimal_value)
return decimal_value; return decimal_value;
case E_DEC_DIV_ZERO: case E_DEC_DIV_ZERO:
signal_divide_by_null(); signal_divide_by_null();
/* fall through */
default: default:
null_value= 1; null_value= 1;
return 0; return 0;

View File

@ -4430,7 +4430,7 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
goto null; goto null;
case DYN_COL_INT: case DYN_COL_INT:
signed_value= 1; // For error message signed_value= 1; // For error message
/* fall_trough */ /* fall through */
case DYN_COL_UINT: case DYN_COL_UINT:
if (signed_value || val.x.ulong_value <= LONGLONG_MAX) if (signed_value || val.x.ulong_value <= LONGLONG_MAX)
{ {
@ -4443,7 +4443,7 @@ bool Item_dyncol_get::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
} }
/* let double_to_datetime_with_warn() issue the warning message */ /* let double_to_datetime_with_warn() issue the warning message */
val.x.double_value= static_cast<double>(ULONGLONG_MAX); val.x.double_value= static_cast<double>(ULONGLONG_MAX);
/* fall_trough */ /* fall through */
case DYN_COL_DOUBLE: case DYN_COL_DOUBLE:
if (double_to_datetime_with_warn(val.x.double_value, ltime, fuzzy_date, if (double_to_datetime_with_warn(val.x.double_value, ltime, fuzzy_date,
0 /* TODO */)) 0 /* TODO */))

View File

@ -7261,8 +7261,10 @@ void TC_LOG_MMAP::close()
mysql_cond_destroy(&COND_pool); mysql_cond_destroy(&COND_pool);
mysql_cond_destroy(&COND_active); mysql_cond_destroy(&COND_active);
mysql_cond_destroy(&COND_queue_busy); mysql_cond_destroy(&COND_queue_busy);
/* fall through */
case 5: case 5:
data[0]='A'; // garble the first (signature) byte, in case mysql_file_delete fails data[0]='A'; // garble the first (signature) byte, in case mysql_file_delete fails
/* fall through */
case 4: case 4:
for (i=0; i < npages; i++) for (i=0; i < npages; i++)
{ {
@ -7271,10 +7273,13 @@ void TC_LOG_MMAP::close()
mysql_mutex_destroy(&pages[i].lock); mysql_mutex_destroy(&pages[i].lock);
mysql_cond_destroy(&pages[i].cond); mysql_cond_destroy(&pages[i].cond);
} }
/* fall through */
case 3: case 3:
my_free(pages); my_free(pages);
/* fall through */
case 2: case 2:
my_munmap((char*)data, (size_t)file_length); my_munmap((char*)data, (size_t)file_length);
/* fall through */
case 1: case 1:
mysql_file_close(fd, MYF(0)); mysql_file_close(fd, MYF(0));
} }

View File

@ -6437,21 +6437,6 @@ User_var_log_event(const char* buf, uint event_len,
we keep the flags set to UNDEF_F. we keep the flags set to UNDEF_F.
*/ */
uint bytes_read= ((val + val_len) - start); uint bytes_read= ((val + val_len) - start);
#ifndef DBUG_OFF
bool old_pre_checksum_fd= description_event->is_version_before_checksum(
&description_event->server_version_split);
#endif
DBUG_ASSERT((bytes_read == data_written -
(old_pre_checksum_fd ||
(description_event->checksum_alg ==
BINLOG_CHECKSUM_ALG_OFF)) ?
0 : BINLOG_CHECKSUM_LEN)
||
(bytes_read == data_written -1 -
(old_pre_checksum_fd ||
(description_event->checksum_alg ==
BINLOG_CHECKSUM_ALG_OFF)) ?
0 : BINLOG_CHECKSUM_LEN));
if ((data_written - bytes_read) > 0) if ((data_written - bytes_read) > 0)
{ {
flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE + flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +

View File

@ -1047,6 +1047,7 @@ static int maxmin_in_range(bool max_fl, Field* field, COND *cond)
case Item_func::LT_FUNC: case Item_func::LT_FUNC:
case Item_func::LE_FUNC: case Item_func::LE_FUNC:
less_fl= 1; less_fl= 1;
/* fall through */
case Item_func::GT_FUNC: case Item_func::GT_FUNC:
case Item_func::GE_FUNC: case Item_func::GE_FUNC:
{ {

View File

@ -34,8 +34,6 @@
partition_info *partition_info::get_clone() partition_info *partition_info::get_clone()
{ {
if (!this)
return 0;
List_iterator<partition_element> part_it(partitions); List_iterator<partition_element> part_it(partitions);
partition_element *part; partition_element *part;
partition_info *clone= new partition_info(); partition_info *clone= new partition_info();

View File

@ -139,7 +139,7 @@ sp_get_item_value(THD *thd, Item *item, String *str)
case DECIMAL_RESULT: case DECIMAL_RESULT:
if (item->field_type() != MYSQL_TYPE_BIT) if (item->field_type() != MYSQL_TYPE_BIT)
return item->val_str(str); return item->val_str(str);
else {/* Bit type is handled as binary string */} /* fall through */
case STRING_RESULT: case STRING_RESULT:
{ {
String *result= item->val_str(str); String *result= item->val_str(str);

View File

@ -54,7 +54,6 @@ static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list)
if (thd->stmt_da->is_ok()) if (thd->stmt_da->is_ok())
thd->stmt_da->reset_diagnostics_area(); thd->stmt_da->reset_diagnostics_area();
table_list->table= NULL; table_list->table= NULL;
result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK;
DBUG_RETURN(result_code); DBUG_RETURN(result_code);
} }

View File

@ -1147,12 +1147,14 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
state= MY_LEX_HEX_NUMBER; state= MY_LEX_HEX_NUMBER;
break; break;
} }
/* fall through */
case MY_LEX_IDENT_OR_BIN: case MY_LEX_IDENT_OR_BIN:
if (lip->yyPeek() == '\'') if (lip->yyPeek() == '\'')
{ // Found b'bin-number' { // Found b'bin-number'
state= MY_LEX_BIN_NUMBER; state= MY_LEX_BIN_NUMBER;
break; break;
} }
/* fall through */
case MY_LEX_IDENT: case MY_LEX_IDENT:
const char *start; const char *start;
#if defined(USE_MB) && defined(USE_MB_IDENT) #if defined(USE_MB) && defined(USE_MB_IDENT)
@ -1499,7 +1501,7 @@ static int lex_one_token(YYSTYPE *yylval, THD *thd)
state= MY_LEX_USER_VARIABLE_DELIMITER; state= MY_LEX_USER_VARIABLE_DELIMITER;
break; break;
} }
/* " used for strings */ /* fall through */ /* " used for strings */
case MY_LEX_STRING: // Incomplete text string case MY_LEX_STRING: // Incomplete text string
if (!(yylval->lex_str.str = get_text(lip, 1, 1))) if (!(yylval->lex_str.str = get_text(lip, 1, 1)))
{ {

View File

@ -2481,7 +2481,7 @@ case SQLCOM_PREPARE:
#ifdef WITH_PARTITION_STORAGE_ENGINE #ifdef WITH_PARTITION_STORAGE_ENGINE
{ {
partition_info *part_info= thd->lex->part_info; partition_info *part_info= thd->lex->part_info;
if (part_info && !(part_info= thd->lex->part_info->get_clone())) if (part_info && !(part_info= part_info->get_clone()))
{ {
res= -1; res= -1;
goto end_with_restore_list; goto end_with_restore_list;
@ -2850,8 +2850,8 @@ end_with_restore_list:
/* mysql_update return 2 if we need to switch to multi-update */ /* mysql_update return 2 if we need to switch to multi-update */
if (up_result != 2) if (up_result != 2)
break; break;
/* Fall through */
} }
/* fall through */
case SQLCOM_UPDATE_MULTI: case SQLCOM_UPDATE_MULTI:
{ {
DBUG_ASSERT(first_table == all_tables && first_table != 0); DBUG_ASSERT(first_table == all_tables && first_table != 0);
@ -2961,6 +2961,7 @@ end_with_restore_list:
DBUG_PRINT("debug", ("Just after generate_incident()")); DBUG_PRINT("debug", ("Just after generate_incident()"));
} }
#endif #endif
/* fall through */
case SQLCOM_INSERT: case SQLCOM_INSERT:
{ {
DBUG_ASSERT(first_table == all_tables && first_table != 0); DBUG_ASSERT(first_table == all_tables && first_table != 0);
@ -3698,6 +3699,7 @@ end_with_restore_list:
initialize this variable because RESET shares the same code as FLUSH initialize this variable because RESET shares the same code as FLUSH
*/ */
lex->no_write_to_binlog= 1; lex->no_write_to_binlog= 1;
/* fall through */
case SQLCOM_FLUSH: case SQLCOM_FLUSH:
{ {
int write_to_binlog; int write_to_binlog;

View File

@ -4640,7 +4640,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
thd->work_part_info= thd->lex->part_info; thd->work_part_info= thd->lex->part_info;
if (thd->work_part_info && if (thd->work_part_info &&
!(thd->work_part_info= thd->lex->part_info->get_clone())) !(thd->work_part_info= thd->work_part_info->get_clone()))
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
/* ALTER_ADMIN_PARTITION is handled in mysql_admin_table */ /* ALTER_ADMIN_PARTITION is handled in mysql_admin_table */

View File

@ -1822,10 +1822,10 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
case '\0': case '\0':
list= NULL; /* terminate the loop */ list= NULL; /* terminate the loop */
/* fall through */ /* fall through */
case ';':
#ifndef __WIN__ #ifndef __WIN__
case ':': /* can't use this as delimiter as it may be drive letter */ case ':': /* can't use this as delimiter as it may be drive letter */
#endif #endif
case ';':
str->str[str->length]= '\0'; str->str[str->length]= '\0';
if (str == &name) // load all plugins in named module if (str == &name) // load all plugins in named module
{ {
@ -1863,6 +1863,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, const char *list)
str->str= p; str->str= p;
continue; continue;
} }
/* fall through */
default: default:
str->length++; str->length++;
continue; continue;
@ -3947,4 +3948,3 @@ void add_plugin_options(DYNAMIC_ARRAY *options, MEM_ROOT *mem_root)
insert_dynamic(options, (uchar*) opt); insert_dynamic(options, (uchar*) opt);
} }
} }

View File

@ -2075,6 +2075,7 @@ static bool check_prepared_statement(Prepared_statement *stmt)
if (res != 2) if (res != 2)
break; break;
/* fall through */
case SQLCOM_UPDATE_MULTI: case SQLCOM_UPDATE_MULTI:
res= mysql_test_multiupdate(stmt, tables, res == 2); res= mysql_test_multiupdate(stmt, tables, res == 2);
break; break;

View File

@ -1139,6 +1139,7 @@ impossible position";
loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK); loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK);
break; break;
} }
/* fall through */
default: default:
errmsg = "could not find next log"; errmsg = "could not find next log";
my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG; my_errno= ER_MASTER_FATAL_ERROR_READING_BINLOG;

View File

@ -931,6 +931,7 @@ public:
is_handled= FALSE; is_handled= FALSE;
break; break;
} }
/* fall through */
case ER_COLUMNACCESS_DENIED_ERROR: case ER_COLUMNACCESS_DENIED_ERROR:
case ER_VIEW_NO_EXPLAIN: /* Error was anonymized, ignore all the same. */ case ER_VIEW_NO_EXPLAIN: /* Error was anonymized, ignore all the same. */
case ER_PROCACCESS_DENIED_ERROR: case ER_PROCACCESS_DENIED_ERROR:

View File

@ -5504,7 +5504,7 @@ bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
case LEAVE_AS_IS: case LEAVE_AS_IS:
if (!indexes_were_disabled) if (!indexes_were_disabled)
break; break;
/* fall-through: disabled indexes */ /* fall-through */
case DISABLE: case DISABLE:
error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE); error= table->file->ha_disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
} }

View File

@ -4212,15 +4212,11 @@ size_number:
switch (end_ptr[0]) switch (end_ptr[0])
{ {
case 'g': case 'g':
case 'G': case 'G': text_shift_number+=30; break;
text_shift_number+=10;
case 'm': case 'm':
case 'M': case 'M': text_shift_number+=20; break;
text_shift_number+=10;
case 'k': case 'k':
case 'K': case 'K': text_shift_number+=10; break;
text_shift_number+=10;
break;
default: default:
{ {
my_error(ER_WRONG_SIZE_NUMBER, MYF(0)); my_error(ER_WRONG_SIZE_NUMBER, MYF(0));

View File

@ -1421,6 +1421,7 @@ bool ha_federated::create_where_from_key(String *to,
} }
break; break;
} }
/* fall through */
case HA_READ_KEY_OR_NEXT: case HA_READ_KEY_OR_NEXT:
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_NEXT %d", i)); DBUG_PRINT("info", ("federated HA_READ_KEY_OR_NEXT %d", i));
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||
@ -1440,6 +1441,7 @@ bool ha_federated::create_where_from_key(String *to,
goto err; goto err;
break; break;
} }
/* fall through */
case HA_READ_KEY_OR_PREV: case HA_READ_KEY_OR_PREV:
DBUG_PRINT("info", ("federated HA_READ_KEY_OR_PREV %d", i)); DBUG_PRINT("info", ("federated HA_READ_KEY_OR_PREV %d", i));
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||
@ -2973,6 +2975,7 @@ int ha_federated::extra(ha_extra_function operation)
break; break;
case HA_EXTRA_PREPARE_FOR_DROP: case HA_EXTRA_PREPARE_FOR_DROP:
table_will_be_deleted = TRUE; table_will_be_deleted = TRUE;
break;
default: default:
/* do nothing */ /* do nothing */
DBUG_PRINT("info",("unhandled operation: %d", (uint) operation)); DBUG_PRINT("info",("unhandled operation: %d", (uint) operation));

View File

@ -263,8 +263,7 @@ ulong federatedx_io_mysql::savepoint_release(ulong sp)
savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *); savept= dynamic_element(&savepoints, savepoints.elements - 1, SAVEPT *);
if (savept->level < sp) if (savept->level < sp)
break; break;
if ((savept->flags & (SAVEPOINT_REALIZED | if ((savept->flags & (SAVEPOINT_REALIZED | SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED)
SAVEPOINT_RESTRICT)) == SAVEPOINT_REALIZED)
last= savept; last= savept;
savepoints.elements--; savepoints.elements--;
} }

View File

@ -1340,6 +1340,7 @@ bool ha_federatedx::create_where_from_key(String *to,
} }
break; break;
} }
/* fall through */
case HA_READ_KEY_OR_NEXT: case HA_READ_KEY_OR_NEXT:
DBUG_PRINT("info", ("federatedx HA_READ_KEY_OR_NEXT %d", i)); DBUG_PRINT("info", ("federatedx HA_READ_KEY_OR_NEXT %d", i));
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||
@ -1359,6 +1360,7 @@ bool ha_federatedx::create_where_from_key(String *to,
goto err; goto err;
break; break;
} }
/* fall through */
case HA_READ_KEY_OR_PREV: case HA_READ_KEY_OR_PREV:
DBUG_PRINT("info", ("federatedx HA_READ_KEY_OR_PREV %d", i)); DBUG_PRINT("info", ("federatedx HA_READ_KEY_OR_PREV %d", i));
if (emit_key_part_name(&tmp, key_part) || if (emit_key_part_name(&tmp, key_part) ||

View File

@ -94,7 +94,7 @@ int heap_create(const char *name, HP_CREATE_INFO *create_info,
case HA_KEYTYPE_VARBINARY1: case HA_KEYTYPE_VARBINARY1:
/* Case-insensitiveness is handled in coll->hash_sort */ /* Case-insensitiveness is handled in coll->hash_sort */
keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT1; keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT1;
/* fall_through */ /* fall through */
case HA_KEYTYPE_VARTEXT1: case HA_KEYTYPE_VARTEXT1:
keyinfo->flag|= HA_VAR_LENGTH_KEY; keyinfo->flag|= HA_VAR_LENGTH_KEY;
length+= 2; length+= 2;

View File

@ -34,6 +34,7 @@ int heap_extra(register HP_INFO *info, enum ha_extra_function function)
switch (function) { switch (function) {
case HA_EXTRA_RESET_STATE: case HA_EXTRA_RESET_STATE:
heap_reset(info); heap_reset(info);
/* fall through */
case HA_EXTRA_NO_READCHECK: case HA_EXTRA_NO_READCHECK:
info->opt_flag&= ~READ_CHECK_USED; /* No readcheck */ info->opt_flag&= ~READ_CHECK_USED; /* No readcheck */
break; break;

View File

@ -5129,7 +5129,7 @@ ha_innobase::innobase_lock_autoinc(void)
break; break;
} }
} }
/* Fall through to old style locking. */ /* fall through */
case AUTOINC_OLD_STYLE_LOCKING: case AUTOINC_OLD_STYLE_LOCKING:
error = row_lock_table_autoinc_for_mysql(prebuilt); error = row_lock_table_autoinc_for_mysql(prebuilt);
@ -7080,7 +7080,7 @@ create_options_are_valid(
case ROW_TYPE_DYNAMIC: case ROW_TYPE_DYNAMIC:
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE; CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE;
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE; CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
/* fall through since dynamic also shuns KBS */ /* fall through */ /* since dynamic also shuns KBS */
case ROW_TYPE_COMPACT: case ROW_TYPE_COMPACT:
case ROW_TYPE_REDUNDANT: case ROW_TYPE_REDUNDANT:
if (kbs_specified) { if (kbs_specified) {
@ -7326,6 +7326,7 @@ ha_innobase::create(
thd, MYSQL_ERROR::WARN_LEVEL_WARN, thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION, ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: assuming ROW_FORMAT=COMPACT."); "InnoDB: assuming ROW_FORMAT=COMPACT.");
/* fall through */
case ROW_TYPE_DEFAULT: case ROW_TYPE_DEFAULT:
case ROW_TYPE_COMPACT: case ROW_TYPE_COMPACT:
flags = DICT_TF_COMPACT; flags = DICT_TF_COMPACT;

View File

@ -477,7 +477,7 @@ dtype_get_fixed_size_low(
#else /* !UNIV_HOTBACKUP */ #else /* !UNIV_HOTBACKUP */
return(len); return(len);
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
/* fall through for variable-length charsets */ /* fall through */ /* for variable-length charsets */
case DATA_VARCHAR: case DATA_VARCHAR:
case DATA_BINARY: case DATA_BINARY:
case DATA_DECIMAL: case DATA_DECIMAL:

View File

@ -170,7 +170,7 @@ page_zip_rec_needs_ext(
ignored if zip_size == 0 */ ignored if zip_size == 0 */
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */ ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
{ {
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES); ut_ad(rec_size > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
ut_ad(ut_is_2pow(zip_size)); ut_ad(ut_is_2pow(zip_size));
ut_ad(comp || !zip_size); ut_ad(comp || !zip_size);

View File

@ -3495,7 +3495,7 @@ check_next_foreign:
row_mysql_handle_errors(&err, trx, NULL, NULL); row_mysql_handle_errors(&err, trx, NULL, NULL);
/* Fall through to raise error */ /* fall through */
default: default:
/* No other possible error returns */ /* No other possible error returns */
@ -4315,7 +4315,8 @@ loop:
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr); fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
dict_index_name_print(stderr, prebuilt->trx, index); dict_index_name_print(stderr, prebuilt->trx, index);
fprintf(stderr, " returned %lu\n", ret); fprintf(stderr, " returned %lu\n", ret);
/* fall through (this error is ignored by CHECK TABLE) */ /* this error is ignored by CHECK TABLE */
/* fall through */
case DB_END_OF_INDEX: case DB_END_OF_INDEX:
func_exit: func_exit:
mem_free(buf); mem_free(buf);

View File

@ -407,8 +407,8 @@ row_purge_remove_sec_if_poss_leaf(
goto func_exit; goto func_exit;
} }
} }
/* fall through (the index entry is still needed, /* the index entry is still needed, or the deletion succeeded */
or the deletion succeeded) */ /* fall through */
case ROW_NOT_DELETED_REF: case ROW_NOT_DELETED_REF:
/* The index entry is still needed. */ /* The index entry is still needed. */
case ROW_BUFFERED: case ROW_BUFFERED:

View File

@ -2675,6 +2675,7 @@ row_sel_field_store_in_mysql_format(
case DATA_SYS: case DATA_SYS:
/* These column types should never be shipped to MySQL. */ /* These column types should never be shipped to MySQL. */
ut_ad(0); ut_ad(0);
/* fall through */
case DATA_CHAR: case DATA_CHAR:
case DATA_FIXBINARY: case DATA_FIXBINARY:

View File

@ -157,6 +157,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
if (info->s->data_file_type != DYNAMIC_RECORD) if (info->s->data_file_type != DYNAMIC_RECORD)
break; break;
/* Remove read/write cache if dynamic rows */ /* Remove read/write cache if dynamic rows */
/* fall through */
case HA_EXTRA_NO_CACHE: case HA_EXTRA_NO_CACHE:
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{ {
@ -313,7 +314,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
share->state.open_count= 1; share->state.open_count= 1;
share->changed= 1; share->changed= 1;
_ma_mark_file_changed_now(share); _ma_mark_file_changed_now(share);
/* Fall trough */ /* fall through */
case HA_EXTRA_PREPARE_FOR_RENAME: case HA_EXTRA_PREPARE_FOR_RENAME:
{ {
my_bool do_flush= test(function != HA_EXTRA_PREPARE_FOR_DROP); my_bool do_flush= test(function != HA_EXTRA_PREPARE_FOR_DROP);

View File

@ -1169,6 +1169,7 @@ uint _ma_apply_redo_index(MARIA_HA *info,
goto err; goto err;
} }
page_length= page.size; page_length= page.size;
break;
} }
case KEY_OP_NONE: case KEY_OP_NONE:
default: default:

View File

@ -3059,7 +3059,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
case LOGREC_REDO_INDEX: case LOGREC_REDO_INDEX:
case LOGREC_REDO_INDEX_FREE_PAGE: case LOGREC_REDO_INDEX_FREE_PAGE:
index_page_redo_entry= 1; index_page_redo_entry= 1;
/* Fall trough*/ /* fall through*/
case LOGREC_REDO_INSERT_ROW_HEAD: case LOGREC_REDO_INSERT_ROW_HEAD:
case LOGREC_REDO_INSERT_ROW_TAIL: case LOGREC_REDO_INSERT_ROW_TAIL:
case LOGREC_REDO_PURGE_ROW_HEAD: case LOGREC_REDO_PURGE_ROW_HEAD:

View File

@ -150,6 +150,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
if (info->s->data_file_type != DYNAMIC_RECORD) if (info->s->data_file_type != DYNAMIC_RECORD)
break; break;
/* Remove read/write cache if dynamic rows */ /* Remove read/write cache if dynamic rows */
/* fall through */
case HA_EXTRA_NO_CACHE: case HA_EXTRA_NO_CACHE:
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{ {
@ -262,7 +263,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
//share->deleting= TRUE; //share->deleting= TRUE;
share->global_changed= FALSE; /* force writing changed flag */ share->global_changed= FALSE; /* force writing changed flag */
_mi_mark_file_changed(info); _mi_mark_file_changed(info);
/* Fall trough */ /* fall through */
case HA_EXTRA_PREPARE_FOR_RENAME: case HA_EXTRA_PREPARE_FOR_RENAME:
mysql_mutex_lock(&THR_LOCK_myisam); mysql_mutex_lock(&THR_LOCK_myisam);
share->last_version= 0L; /* Impossible version */ share->last_version= 0L; /* Impossible version */

View File

@ -1661,13 +1661,16 @@ bool CSphSEQuery::ParseField ( char * sField )
char * sLat = sValue; char * sLat = sValue;
char * p = sValue; char * p = sValue;
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; if (!( p = strchr ( p, ',' ) )) break;
*p++ = '\0';
char * sLong = p; char * sLong = p;
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; if (!( p = strchr ( p, ',' ) )) break;
*p++ = '\0';
char * sLatVal = p; char * sLatVal = p;
if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; if (!( p = strchr ( p, ',' ) )) break;
*p++ = '\0';
char * sLongVal = p; char * sLongVal = p;
m_sGeoLatAttr = chop(sLat); m_sGeoLatAttr = chop(sLat);
@ -1736,7 +1739,8 @@ bool CSphSEQuery::ParseField ( char * sField )
while ( sRest ) while ( sRest )
{ {
char * sId = sRest; char * sId = sRest;
if (!( sRest = strchr ( sRest, ':' ) )) break; *sRest++ = '\0'; if (!( sRest = strchr ( sRest, ':' ) )) break;
*sRest++ = '\0';
if (!( sRest - sId )) break; if (!( sRest - sId )) break;
char * sValue = sRest; char * sValue = sRest;

View File

@ -100,6 +100,7 @@ endmacro(append_cflags_if_supported)
set_cflags_if_supported(-Wno-missing-field-initializers) set_cflags_if_supported(-Wno-missing-field-initializers)
append_cflags_if_supported(-Wno-vla) append_cflags_if_supported(-Wno-vla)
append_cflags_if_supported(-Wno-implicit-fallthrough)
ADD_SUBDIRECTORY(ft-index) ADD_SUBDIRECTORY(ft-index)

View File

@ -6144,7 +6144,7 @@ ha_innobase::innobase_lock_autoinc(void)
break; break;
} }
} }
/* Fall through to old style locking. */ /* fall through */
case AUTOINC_OLD_STYLE_LOCKING: case AUTOINC_OLD_STYLE_LOCKING:
error = row_lock_table_autoinc_for_mysql(prebuilt); error = row_lock_table_autoinc_for_mysql(prebuilt);
@ -8190,7 +8190,7 @@ create_options_are_valid(
case ROW_TYPE_DYNAMIC: case ROW_TYPE_DYNAMIC:
CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE; CHECK_ERROR_ROW_TYPE_NEEDS_FILE_PER_TABLE;
CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE; CHECK_ERROR_ROW_TYPE_NEEDS_GT_ANTELOPE;
/* fall through since dynamic also shuns KBS */ /* fall through */ /* since dynamic also shuns KBS */
case ROW_TYPE_COMPACT: case ROW_TYPE_COMPACT:
case ROW_TYPE_REDUNDANT: case ROW_TYPE_REDUNDANT:
if (kbs_specified) { if (kbs_specified) {
@ -8436,6 +8436,7 @@ ha_innobase::create(
thd, MYSQL_ERROR::WARN_LEVEL_WARN, thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_ILLEGAL_HA_CREATE_OPTION, ER_ILLEGAL_HA_CREATE_OPTION,
"InnoDB: assuming ROW_FORMAT=COMPACT."); "InnoDB: assuming ROW_FORMAT=COMPACT.");
/* fall through */
case ROW_TYPE_DEFAULT: case ROW_TYPE_DEFAULT:
case ROW_TYPE_COMPACT: case ROW_TYPE_COMPACT:
flags = DICT_TF_COMPACT; flags = DICT_TF_COMPACT;

View File

@ -477,7 +477,7 @@ dtype_get_fixed_size_low(
#else /* !UNIV_HOTBACKUP */ #else /* !UNIV_HOTBACKUP */
return(len); return(len);
#endif /* !UNIV_HOTBACKUP */ #endif /* !UNIV_HOTBACKUP */
/* fall through for variable-length charsets */ /* fall through */
case DATA_VARCHAR: case DATA_VARCHAR:
case DATA_BINARY: case DATA_BINARY:
case DATA_DECIMAL: case DATA_DECIMAL:

View File

@ -170,7 +170,7 @@ page_zip_rec_needs_ext(
ignored if zip_size == 0 */ ignored if zip_size == 0 */
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */ ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
{ {
ut_ad(rec_size > comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES); ut_ad(rec_size > (comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
ut_ad(ut_is_2pow(zip_size)); ut_ad(ut_is_2pow(zip_size));
ut_ad(comp || !zip_size); ut_ad(comp || !zip_size);

View File

@ -3635,7 +3635,7 @@ check_next_foreign:
row_mysql_handle_errors(&err, trx, NULL, NULL); row_mysql_handle_errors(&err, trx, NULL, NULL);
/* Fall through to raise error */ /* fall through */ /* to raise error */
default: default:
/* No other possible error returns */ /* No other possible error returns */
@ -4455,7 +4455,7 @@ loop:
fputs(" InnoDB: Warning: CHECK TABLE on ", stderr); fputs(" InnoDB: Warning: CHECK TABLE on ", stderr);
dict_index_name_print(stderr, prebuilt->trx, index); dict_index_name_print(stderr, prebuilt->trx, index);
fprintf(stderr, " returned %lu\n", ret); fprintf(stderr, " returned %lu\n", ret);
/* fall through (this error is ignored by CHECK TABLE) */ /* fall through */ /* this error is ignored by CHECK TABLE */
case DB_END_OF_INDEX: case DB_END_OF_INDEX:
func_exit: func_exit:
mem_free(buf); mem_free(buf);

View File

@ -407,8 +407,8 @@ row_purge_remove_sec_if_poss_leaf(
goto func_exit; goto func_exit;
} }
} }
/* fall through (the index entry is still needed, /* the index entry is still needed, or the deletion succeeded */
or the deletion succeeded) */ /* fall through */
case ROW_NOT_DELETED_REF: case ROW_NOT_DELETED_REF:
/* The index entry is still needed. */ /* The index entry is still needed. */
case ROW_BUFFERED: case ROW_BUFFERED:

View File

@ -2678,6 +2678,7 @@ row_sel_field_store_in_mysql_format(
case DATA_SYS: case DATA_SYS:
/* These column types should never be shipped to MySQL. */ /* These column types should never be shipped to MySQL. */
ut_ad(0); ut_ad(0);
/* fall through */
case DATA_CHAR: case DATA_CHAR:
case DATA_FIXBINARY: case DATA_FIXBINARY:

View File

@ -2488,14 +2488,18 @@ static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALLN(count); return MY_CS_TOOSMALLN(count);
switch (count) { switch (count) {
/* Fall through all cases!!! */
#ifdef UNICODE_32BIT #ifdef UNICODE_32BIT
case 6: r[5] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000; case 6: r[5] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000;
/* fall through */
case 5: r[4] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000; case 5: r[4] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000;
/* fall through */
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
#endif #endif
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc; case 1: r[0] = (uchar) wc;
} }
return count; return count;
@ -2521,9 +2525,10 @@ static int my_uni_utf8_no_range(CHARSET_INFO *cs __attribute__((unused)),
switch (count) switch (count)
{ {
/* Fall through all cases!!! */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800; case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0; case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc; case 1: r[0]= (uchar) wc;
} }
return count; return count;
@ -4979,10 +4984,12 @@ my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALLN(count); return MY_CS_TOOSMALLN(count);
switch (count) { switch (count) {
/* Fall through all cases!!! */
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc; case 1: r[0] = (uchar) wc;
} }
return count; return count;
@ -5011,10 +5018,12 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
switch (count) switch (count)
{ {
/* Fall through all cases!!! */
case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000; case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800; case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0; case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc; case 1: r[0]= (uchar) wc;
} }
return count; return count;

View File

@ -1377,7 +1377,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
switch (*s) { switch (*s) {
case '-': case '-':
sign= 1; sign= 1;
/* no break */ /* fall through */
case '+': case '+':
s++; s++;
goto break2; goto break2;
@ -1465,10 +1465,9 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
esign= 0; esign= 0;
if (++s < end) if (++s < end)
switch (c= *s) { switch (c= *s) {
case '-': case '-': esign= 1;
esign= 1; /* fall through */
case '+': case '+': c= *++s;
c= *++s;
} }
if (s < end && c >= '0' && c <= '9') if (s < end && c >= '0' && c <= '9')
{ {
@ -2360,7 +2359,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break; break;
case 2: case 2:
leftright= 0; leftright= 0;
/* no break */ /* fall through */
case 4: case 4:
if (ndigits <= 0) if (ndigits <= 0)
ndigits= 1; ndigits= 1;
@ -2368,7 +2367,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break; break;
case 3: case 3:
leftright= 0; leftright= 0;
/* no break */ /* fall through */
case 5: case 5:
i= ndigits + k + 1; i= ndigits + k + 1;
ilim= i; ilim= i;