[Spice-devel] [PATCH spice] Add "fall through" comments where necessary

Frediano Ziglio fziglio at redhat.com
Tue May 16 12:44:45 UTC 2017


> 
> Make gcc 7.0.1 happy
> ---
> I am unable to compile using defaults on Fedora 26

Gcc 7 is now released. Patch still apply and works correctly,

Acked-by: Frediano Ziglio <fziglio at redhat.com>

Frediano

> ---
>  server/dcc.c            | 3 ++-
>  server/inputs-channel.c | 2 +-
>  server/reds.c           | 2 ++
>  3 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/server/dcc.c b/server/dcc.c
> index afe37b1a..7c3d3765 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -885,8 +885,9 @@ int dcc_compress_image(DisplayChannelClient *dcc,
>              break;
>          }
>  #endif
> -lz_compress:
> +        /* fall through */
>      case SPICE_IMAGE_COMPRESSION_LZ:
> +lz_compress:
>          success = image_encoders_compress_lz(&dcc->priv->encoders, dest,
>          src, o_comp_data);
>          if (success && !bitmap_fmt_is_rgb(src->format)) {
>              dcc_palette_cache_palette(dcc, dest->u.lz_plt.palette,
>              &(dest->u.lz_plt.flags));
> diff --git a/server/inputs-channel.c b/server/inputs-channel.c
> index f105b4d0..0fb4d949 100644
> --- a/server/inputs-channel.c
> +++ b/server/inputs-channel.c
> @@ -295,8 +295,8 @@ static int inputs_channel_handle_parsed(RedChannelClient
> *rcc, uint32_t size, ui
>              key_down->code == SCROLL_LOCK_SCAN_CODE) {
>              activate_modifiers_watch(inputs_channel, reds);
>          }
> -        /* fallthrough */
>      }
> +        /* fallthrough */
>      case SPICE_MSGC_INPUTS_KEY_UP: {
>          SpiceMsgcKeyUp *key_up = message;
>          for (i = 0; i < 4; i++) {
> diff --git a/server/reds.c b/server/reds.c
> index 953a95a4..bd24741b 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -766,6 +766,7 @@ static RedPipeItem
> *vdi_port_read_one_msg_from_device(RedCharDevice *self,
>              }
>              dev->priv->message_receive_len =
>              dev->priv->vdi_chunk_header.size;
>              dev->priv->read_state = VDI_PORT_READ_STATE_GET_BUFF;
> +            /* fall through */
>          case VDI_PORT_READ_STATE_GET_BUFF: {
>              if (!(dev->priv->current_read_buf =
>              vdi_port_get_read_buf(reds->agent_dev))) {
>                  return NULL;
> @@ -777,6 +778,7 @@ static RedPipeItem
> *vdi_port_read_one_msg_from_device(RedCharDevice *self,
>              dev->priv->message_receive_len -= dev->priv->receive_len;
>              dev->priv->read_state = VDI_PORT_READ_STATE_READ_DATA;
>          }
> +            /* fall through */
>          case VDI_PORT_READ_STATE_READ_DATA: {
>              n = sif->read(reds->vdagent, dev->priv->receive_pos,
>              dev->priv->receive_len);
>              if (!n) {



More information about the Spice-devel mailing list