mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
good: Clearly specify fallthrough in switch/case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
This commit is contained in:
parent
2a6c1bbb01
commit
8bc17b58a2
19 changed files with 36 additions and 21 deletions
|
@ -848,7 +848,7 @@ gst_isoff_sidx_parser_parse (GstSidxParser * parser,
|
|||
parser->sidx.flags = gst_byte_reader_get_uint24_le_unchecked (reader);
|
||||
|
||||
parser->status = GST_ISOFF_SIDX_PARSER_HEADER;
|
||||
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GST_ISOFF_SIDX_PARSER_HEADER:
|
||||
remaining = gst_byte_reader_get_remaining (reader);
|
||||
if (remaining < 12 + (parser->sidx.version == 0 ? 8 : 16)) {
|
||||
|
|
|
@ -317,8 +317,8 @@ gst_qt_sink_query (GstBaseSink * bsink, GstQuery * query)
|
|||
qt_sink->display, qt_sink->context, qt_sink->qt_context))
|
||||
return TRUE;
|
||||
|
||||
/* fallthrough */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||
break;
|
||||
|
|
|
@ -305,8 +305,8 @@ gst_qt_src_query (GstBaseSrc * bsrc, GstQuery * query)
|
|||
qt_src->display, qt_src->context, qt_src->qt_context))
|
||||
return TRUE;
|
||||
|
||||
/* fallthrough */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
|
||||
break;
|
||||
|
|
|
@ -319,9 +319,8 @@ gst_qml6_gl_sink_query (GstBaseSink * bsink, GstQuery * query)
|
|||
if (gst_gl_handle_context_query ((GstElement *) qt_sink, query,
|
||||
qt_sink->display, qt_sink->context, qt_sink->qt_context))
|
||||
return TRUE;
|
||||
|
||||
/* fallthrough */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);
|
||||
break;
|
||||
|
|
|
@ -306,9 +306,8 @@ gst_qml6_gl_src_query (GstBaseSrc * bsrc, GstQuery * query)
|
|||
if (gst_gl_handle_context_query ((GstElement *) qt_src, query,
|
||||
qt_src->display, qt_src->context, qt_src->qt_context))
|
||||
return TRUE;
|
||||
|
||||
/* fallthrough */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = GST_BASE_SRC_CLASS (parent_class)->query (bsrc, query);
|
||||
break;
|
||||
|
|
|
@ -108,18 +108,24 @@ gst_wavpack_get_default_channel_mask (gint nchannels)
|
|||
case 11:
|
||||
channel_mask |= 0x00400;
|
||||
channel_mask |= 0x00200;
|
||||
/* FALLTHROUGH */
|
||||
case 9:
|
||||
channel_mask |= 0x00100;
|
||||
/* FALLTHROUGH */
|
||||
case 8:
|
||||
channel_mask |= 0x00080;
|
||||
channel_mask |= 0x00040;
|
||||
/* FALLTHROUGH */
|
||||
case 6:
|
||||
channel_mask |= 0x00020;
|
||||
channel_mask |= 0x00010;
|
||||
/* FALLTHROUGH */
|
||||
case 4:
|
||||
channel_mask |= 0x00008;
|
||||
/* FALLTHROUGH */
|
||||
case 3:
|
||||
channel_mask |= 0x00004;
|
||||
/* FALLTHROUGH */
|
||||
case 2:
|
||||
channel_mask |= 0x00002;
|
||||
channel_mask |= 0x00001;
|
||||
|
|
|
@ -175,18 +175,24 @@ gst_wavpack_get_default_channel_mask (gint nchannels)
|
|||
case 11:
|
||||
channel_mask |= 0x00400;
|
||||
channel_mask |= 0x00200;
|
||||
/* FALLTHROUGH */
|
||||
case 9:
|
||||
channel_mask |= 0x00100;
|
||||
/* FALLTHROUGH */
|
||||
case 8:
|
||||
channel_mask |= 0x00080;
|
||||
channel_mask |= 0x00040;
|
||||
/* FALLTHROUGH */
|
||||
case 6:
|
||||
channel_mask |= 0x00020;
|
||||
channel_mask |= 0x00010;
|
||||
/* FALLTHROUGH */
|
||||
case 4:
|
||||
channel_mask |= 0x00008;
|
||||
/* FALLTHROUGH */
|
||||
case 3:
|
||||
channel_mask |= 0x00004;
|
||||
/* FALLTHROUGH */
|
||||
case 2:
|
||||
channel_mask |= 0x00002;
|
||||
channel_mask |= 0x00001;
|
||||
|
|
|
@ -909,8 +909,8 @@ gst_avi_demux_handle_sink_event (GstPad * pad, GstObject * parent,
|
|||
for (i = 0; i < avi->num_streams; i++) {
|
||||
avi->stream[i].discont = TRUE;
|
||||
}
|
||||
/* fall through to default case so that the event gets passed downstream */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
|
@ -3467,7 +3467,7 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi)
|
|||
/* Need more data */
|
||||
return ret;
|
||||
}
|
||||
/* fall-though */
|
||||
/* FALLTHROUGH */
|
||||
case GST_AVI_DEMUX_HEADER_INFO:
|
||||
GST_DEBUG_OBJECT (avi, "skipping junk between header and data ...");
|
||||
while (TRUE) {
|
||||
|
|
|
@ -289,7 +289,7 @@ gst_push_file_src_ghostpad_event (GstPad * pad, GstObject * parent,
|
|||
ret = FALSE;
|
||||
break;
|
||||
}
|
||||
/* PASSTHROUGH */
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
|
|
|
@ -3353,6 +3353,7 @@ gst_deinterlace_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
}
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
break;
|
||||
|
|
|
@ -264,6 +264,7 @@ goom_update (PluginInfo * goomInfo, gint16 data[2][512], int forceMode,
|
|||
case 10:
|
||||
goomInfo->update.zoomFilterData.hypercosEffect =
|
||||
goom_irand (goomInfo->gRandom, 2);
|
||||
/* FALLTHROUGH */
|
||||
case 13:
|
||||
case 20:
|
||||
case 21:
|
||||
|
|
|
@ -1277,7 +1277,7 @@ gst_interleave_collected (GstCollectPads * pads, GstInterleave * self)
|
|||
segment.stop *= width;
|
||||
if (segment.position != -1)
|
||||
segment.position *= width;
|
||||
/* fallthrough for the samples case */
|
||||
/* FALLTHROUGH */
|
||||
case GST_FORMAT_DEFAULT:
|
||||
segment.start =
|
||||
gst_util_uint64_scale_int (segment.start, GST_SECOND, self->rate);
|
||||
|
|
|
@ -100,7 +100,7 @@ gst_isoff_qt_sidx_parser_add_data (GstSidxParser * parser,
|
|||
parser->sidx.flags = gst_byte_reader_get_uint24_le_unchecked (&reader);
|
||||
|
||||
parser->status = GST_ISOFF_QT_SIDX_PARSER_HEADER;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
case GST_ISOFF_QT_SIDX_PARSER_HEADER:
|
||||
remaining = gst_byte_reader_get_remaining (&reader);
|
||||
if (remaining < 12 + (parser->sidx.version == 0 ? 8 : 16)) {
|
||||
|
|
|
@ -14641,8 +14641,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak, guint32 * mvhd_matrix)
|
|||
break;
|
||||
}
|
||||
case FOURCC_sawb:
|
||||
/* Fallthrough! */
|
||||
amrwb = TRUE;
|
||||
/* FALLTHROUGH */
|
||||
case FOURCC_samr:
|
||||
{
|
||||
gint len = QT_UINT32 (stsd_entry_data);
|
||||
|
@ -16699,9 +16699,10 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
|
|||
if (depth == 8)
|
||||
format = GST_AUDIO_FORMAT_U8;
|
||||
/* otherwise it's signed and big-endian just like 'twos' */
|
||||
/* FALLTHROUGH */
|
||||
case FOURCC_twos:
|
||||
endian = G_BIG_ENDIAN;
|
||||
/* fall-through */
|
||||
/* FALLTHROUGH */
|
||||
case FOURCC_sowt:
|
||||
{
|
||||
gchar *str;
|
||||
|
|
|
@ -6366,8 +6366,8 @@ gst_matroska_demux_handle_sink_event (GstPad * pad, GstObject * parent,
|
|||
demux->cluster_offset = 0;
|
||||
demux->cluster_prevsize = 0;
|
||||
GST_OBJECT_UNLOCK (demux);
|
||||
/* fall-through */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
|
|
|
@ -3199,8 +3199,8 @@ gst_matroska_parse_handle_sink_event (GstPad * pad, GstObject * parent,
|
|||
parse->common.segment.position = GST_CLOCK_TIME_NONE;
|
||||
parse->cluster_time = GST_CLOCK_TIME_NONE;
|
||||
parse->cluster_offset = 0;
|
||||
/* fall-through */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
|
|
|
@ -322,8 +322,8 @@ gst_rtp_rtx_queue_sink_event (GstPad * pad, GstObject * parent,
|
|||
gst_event_copy_segment (event, &rtx->head_segment);
|
||||
g_queue_push_head (rtx->queue, gst_event_ref (event));
|
||||
g_mutex_unlock (&rtx->lock);
|
||||
/* fall through */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
|
|
|
@ -5380,7 +5380,8 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
|
|||
case GST_RTSP_LOWER_TRANS_UDP_MCAST:
|
||||
if (!gst_rtspsrc_stream_configure_mcast (src, stream, transport, &outpad))
|
||||
goto transport_failed;
|
||||
/* fallthrough, the rest is the same for UDP and MCAST */
|
||||
/* the rest is the same for UDP and MCAST */
|
||||
/* FALLTHROUGH */
|
||||
case GST_RTSP_LOWER_TRANS_UDP:
|
||||
if (!gst_rtspsrc_stream_configure_udp (src, stream, transport, &outpad))
|
||||
goto transport_failed;
|
||||
|
@ -6434,6 +6435,7 @@ gst_rtspsrc_loop_udp (GstRTSPSrc * src)
|
|||
continue;
|
||||
case GST_RTSP_ENET:
|
||||
GST_DEBUG_OBJECT (src, "An ethernet problem occurred.");
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL),
|
||||
("Unhandled return value %d.", res));
|
||||
|
|
|
@ -2400,7 +2400,7 @@ gst_wavparse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
if (wav->state != GST_WAVPARSE_HEADER)
|
||||
break;
|
||||
|
||||
/* otherwise fall-through */
|
||||
/* FALLTHROUGH */
|
||||
case GST_WAVPARSE_HEADER:
|
||||
GST_INFO_OBJECT (wav, "GST_WAVPARSE_HEADER");
|
||||
if ((ret = gst_wavparse_stream_headers (wav)) != GST_FLOW_OK)
|
||||
|
@ -2412,7 +2412,7 @@ gst_wavparse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
wav->state = GST_WAVPARSE_DATA;
|
||||
GST_INFO_OBJECT (wav, "GST_WAVPARSE_DATA");
|
||||
|
||||
/* fall-through */
|
||||
/* FALLTHROUGH */
|
||||
case GST_WAVPARSE_DATA:
|
||||
if (buf && GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT))
|
||||
wav->discont = TRUE;
|
||||
|
@ -2600,8 +2600,8 @@ gst_wavparse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
dur = wav->segment.duration;
|
||||
gst_segment_init (&wav->segment, wav->segment.format);
|
||||
wav->segment.duration = dur;
|
||||
/* fall-through */
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
ret = gst_pad_event_default (wav->sinkpad, parent, event);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue