summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-09-16 14:52:42 +0200
committerSergei Golubchik <serg@mariadb.org>2017-10-17 07:37:39 +0200
commitd76f5774fe70c51577cfbfdddcbfb3309d51f06e (patch)
tree579994269a0b9d569e0ac2b4ca024e8027dc4551 /strings
parent3b7aa3017b65dcf11d33617e954e1cb471703582 (diff)
downloadmariadb-git-d76f5774fe70c51577cfbfdddcbfb3309d51f06e.tar.gz
MDEV-13459 Warnings, when compiling with gcc-7.x
mostly caused by -Wimplicit-fallthrough
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-utf8.c17
-rw-r--r--strings/dtoa.c13
2 files changed, 19 insertions, 11 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index f2782657bea..7d39c9127c3 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2488,14 +2488,18 @@ static int my_uni_utf8 (CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALLN(count);
switch (count) {
- /* Fall through all cases!!! */
#ifdef UNICODE_32BIT
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;
+ /* fall through */
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
+ /* fall through */
#endif
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;
+ /* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
@@ -2521,9 +2525,10 @@ static int my_uni_utf8_no_range(CHARSET_INFO *cs __attribute__((unused)),
switch (count)
{
- /* Fall through all cases!!! */
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;
+ /* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
@@ -4979,10 +4984,12 @@ my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
return MY_CS_TOOSMALLN(count);
switch (count) {
- /* Fall through all cases!!! */
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;
+ /* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
+ /* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
@@ -5011,10 +5018,12 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
switch (count)
{
- /* Fall through all cases!!! */
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;
+ /* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
+ /* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
diff --git a/strings/dtoa.c b/strings/dtoa.c
index 6b216056f66..5f50e10c9bf 100644
--- a/strings/dtoa.c
+++ b/strings/dtoa.c
@@ -1377,7 +1377,7 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
switch (*s) {
case '-':
sign= 1;
- /* no break */
+ /* fall through */
case '+':
s++;
goto break2;
@@ -1465,10 +1465,9 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s
esign= 0;
if (++s < end)
switch (c= *s) {
- case '-':
- esign= 1;
- case '+':
- c= *++s;
+ case '-': esign= 1;
+ /* fall through */
+ case '+': c= *++s;
}
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;
case 2:
leftright= 0;
- /* no break */
+ /* fall through */
case 4:
if (ndigits <= 0)
ndigits= 1;
@@ -2368,7 +2367,7 @@ static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
break;
case 3:
leftright= 0;
- /* no break */
+ /* fall through */
case 5:
i= ndigits + k + 1;
ilim= i;