Fixed bug 3813 - gcc7 fallthrough warnings in SDL_iconv.c and SDL_pixels.c
authorSam Lantinga <slouken@libsdl.org>
Sun, 10 Sep 2017 12:42:38 -0700
changeset 114913c9983546738
parent 11490 c7cc4401ab96
child 11492 1d9e9c9fc5c0
Fixed bug 3813 - gcc7 fallthrough warnings in SDL_iconv.c and SDL_pixels.c
src/stdlib/SDL_iconv.c
src/video/SDL_pixels.c
     1.1 --- a/src/stdlib/SDL_iconv.c	Sun Sep 10 12:40:45 2017 -0700
     1.2 +++ b/src/stdlib/SDL_iconv.c	Sun Sep 10 12:42:38 2017 -0700
     1.3 @@ -798,6 +798,7 @@
     1.4              if (ch > 0x10FFFF) {
     1.5                  ch = UNKNOWN_UNICODE;
     1.6              }
     1.7 +            /* fallthrough */
     1.8          case ENCODING_UCS4BE:
     1.9              if (ch > 0x7FFFFFFF) {
    1.10                  ch = UNKNOWN_UNICODE;
    1.11 @@ -819,6 +820,7 @@
    1.12              if (ch > 0x10FFFF) {
    1.13                  ch = UNKNOWN_UNICODE;
    1.14              }
    1.15 +            /* fallthrough */
    1.16          case ENCODING_UCS4LE:
    1.17              if (ch > 0x7FFFFFFF) {
    1.18                  ch = UNKNOWN_UNICODE;
     2.1 --- a/src/video/SDL_pixels.c	Sun Sep 10 12:40:45 2017 -0700
     2.2 +++ b/src/video/SDL_pixels.c	Sun Sep 10 12:42:38 2017 -0700
     2.3 @@ -326,7 +326,7 @@
     2.4          if (Rmask == 0) {
     2.5              return SDL_PIXELFORMAT_RGB555;
     2.6          }
     2.7 -        /* Fall through to 16-bit checks */
     2.8 +	/* fallthrough */
     2.9      case 16:
    2.10          if (Rmask == 0) {
    2.11              return SDL_PIXELFORMAT_RGB565;