NO-OP: fix some Wimplicit-fallthrough
gcc can recognize various regexps in comments. Since C++17 provides [[fallthrough]], using /* fallthrough */ consistently seems appropriate until we switch to C++17. see also https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
This commit is contained in:
parent
37194ec805
commit
e0d5c1426c
|
@ -327,6 +327,7 @@ bool AUCarbonViewControl::HandleEvent(EventHandlerCallRef inHandlerRef, EventRef
|
||||||
case kEventControlSetFocusPart: // tab
|
case kEventControlSetFocusPart: // tab
|
||||||
handled = !handled; // fall through to next case
|
handled = !handled; // fall through to next case
|
||||||
mLastControl = this;
|
mLastControl = this;
|
||||||
|
/* fallthrough */
|
||||||
case kEventControlValueFieldChanged:
|
case kEventControlValueFieldChanged:
|
||||||
GetEventParameter(event, kEventParamDirectObject, typeControlRef, NULL, sizeof(ControlRef), NULL, &control);
|
GetEventParameter(event, kEventParamDirectObject, typeControlRef, NULL, sizeof(ControlRef), NULL, &control);
|
||||||
verify(control == mControl);
|
verify(control == mControl);
|
||||||
|
|
|
@ -354,7 +354,7 @@ Automatable::protect_automation ()
|
||||||
l->set_automation_state (Off);
|
l->set_automation_state (Off);
|
||||||
break;
|
break;
|
||||||
case Latch:
|
case Latch:
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case Touch:
|
case Touch:
|
||||||
l->set_automation_state (Play);
|
l->set_automation_state (Play);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -681,9 +681,9 @@ LuaTableRef::set (lua_State* L)
|
||||||
}
|
}
|
||||||
// invalid userdata -- fall through
|
// invalid userdata -- fall through
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case LUA_TFUNCTION: // no support -- we could... string.format("%q", string.dump(value, true))
|
case LUA_TFUNCTION: // no support -- we could... string.format("%q", string.dump(value, true))
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case LUA_TTABLE: // no nested tables, sorry.
|
case LUA_TTABLE: // no nested tables, sorry.
|
||||||
case LUA_TNIL:
|
case LUA_TNIL:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -429,7 +429,7 @@ SessionPlaylists::maybe_delete_unused (boost::function<int(boost::shared_ptr<Pla
|
||||||
// delete this and all later
|
// delete this and all later
|
||||||
delete_remaining = true;
|
delete_remaining = true;
|
||||||
|
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
// delete this
|
// delete this
|
||||||
playlists_tbd.push_back (*x);
|
playlists_tbd.push_back (*x);
|
||||||
|
|
|
@ -2446,7 +2446,7 @@ retry:
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
no_questions_about_missing_files = true;
|
no_questions_about_missing_files = true;
|
||||||
/* fallthru */
|
/* fallthrough */
|
||||||
|
|
||||||
case -1:
|
case -1:
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -432,10 +432,10 @@ WinMMEMidiOutputDevice::midi_output_thread ()
|
||||||
switch (h.size) {
|
switch (h.size) {
|
||||||
case 3:
|
case 3:
|
||||||
message |= (((DWORD)data[2]) << 16);
|
message |= (((DWORD)data[2]) << 16);
|
||||||
// Fallthrough on purpose.
|
/* fallthrough */
|
||||||
case 2:
|
case 2:
|
||||||
message |= (((DWORD)data[1]) << 8);
|
message |= (((DWORD)data[1]) << 8);
|
||||||
// Fallthrough on purpose.
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
message |= (DWORD)data[0];
|
message |= (DWORD)data[0];
|
||||||
result = midiOutShortMsg (m_handle, message);
|
result = midiOutShortMsg (m_handle, message);
|
||||||
|
|
|
@ -56,7 +56,7 @@ static ClearlooksStyleClass *clearlooks_style_class;
|
||||||
static GtkStyleClass *clearlooks_parent_class;
|
static GtkStyleClass *clearlooks_parent_class;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clearlooks_set_widget_parameters (GtkWidget *widget,
|
clearlooks_set_widget_parameters (GtkWidget *widget,
|
||||||
const GtkStyle *style,
|
const GtkStyle *style,
|
||||||
GtkStateType state_type,
|
GtkStateType state_type,
|
||||||
WidgetParameters *params)
|
WidgetParameters *params)
|
||||||
|
@ -726,11 +726,13 @@ clearlooks_style_draw_box (DRAW_ARGS)
|
||||||
{
|
{
|
||||||
case GTK_PROGRESS_RIGHT_TO_LEFT:
|
case GTK_PROGRESS_RIGHT_TO_LEFT:
|
||||||
tmp.x -= 1;
|
tmp.x -= 1;
|
||||||
|
/* fallthrough */
|
||||||
case GTK_PROGRESS_LEFT_TO_RIGHT:
|
case GTK_PROGRESS_LEFT_TO_RIGHT:
|
||||||
tmp.width += 1;
|
tmp.width += 1;
|
||||||
break;
|
break;
|
||||||
case GTK_PROGRESS_BOTTOM_TO_TOP:
|
case GTK_PROGRESS_BOTTOM_TO_TOP:
|
||||||
tmp.y -= 1;
|
tmp.y -= 1;
|
||||||
|
/* fallthrough */
|
||||||
case GTK_PROGRESS_TOP_TO_BOTTOM:
|
case GTK_PROGRESS_TOP_TO_BOTTOM:
|
||||||
tmp.height += 1;
|
tmp.height += 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -322,7 +322,8 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen) const
|
||||||
// any discrete vector curves somewhere?
|
// any discrete vector curves somewhere?
|
||||||
assert (0);
|
assert (0);
|
||||||
case ControlList::Curved:
|
case ControlList::Curved:
|
||||||
// fallthrough, no 2 point spline
|
/* no 2 point spline */
|
||||||
|
/* fallthrough */
|
||||||
default: // Linear:
|
default: // Linear:
|
||||||
for (int i = 0; i < veclen; ++i) {
|
for (int i = 0; i < veclen; ++i) {
|
||||||
vec[i] = (lx * (m_num / m_den) + m_num * i * dx_num / (m_den * dx_den)) + c;
|
vec[i] = (lx * (m_num / m_den) + m_num * i * dx_num / (m_den * dx_den)) + c;
|
||||||
|
@ -342,7 +343,8 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen) const
|
||||||
// any discrete vector curves somewhere?
|
// any discrete vector curves somewhere?
|
||||||
assert (0);
|
assert (0);
|
||||||
case ControlList::Curved:
|
case ControlList::Curved:
|
||||||
// fallthrough, no 2 point spline
|
/* no 2 point spline */
|
||||||
|
/* fallthrough */
|
||||||
default: // Linear:
|
default: // Linear:
|
||||||
vec[0] = interpolate_linear (lval, uval, fraction);
|
vec[0] = interpolate_linear (lval, uval, fraction);
|
||||||
break;
|
break;
|
||||||
|
@ -441,7 +443,7 @@ Curve::multipoint_eval (double x) const
|
||||||
double x2 = x * x;
|
double x2 = x * x;
|
||||||
return ev->coeff[0] + (ev->coeff[1] * x) + (ev->coeff[2] * x2) + (ev->coeff[3] * x2 * x);
|
return ev->coeff[0] + (ev->coeff[1] * x) + (ev->coeff[2] * x2) + (ev->coeff[3] * x2 * x);
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case ControlList::Linear:
|
case ControlList::Linear:
|
||||||
return before->value + (vdelta * (tdelta / trange));
|
return before->value + (vdelta * (tdelta / trange));
|
||||||
}
|
}
|
||||||
|
|
|
@ -400,7 +400,7 @@ Keyboard::leave_window (GdkEventCrossing *ev, Gtk::Window* /*win*/)
|
||||||
|
|
||||||
case GDK_NOTIFY_VIRTUAL:
|
case GDK_NOTIFY_VIRTUAL:
|
||||||
DEBUG_TRACE (DEBUG::Keyboard, "VIRTUAL crossing ... out\n");
|
DEBUG_TRACE (DEBUG::Keyboard, "VIRTUAL crossing ... out\n");
|
||||||
/* fallthru */
|
/* fallthrough */
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DEBUG_TRACE (DEBUG::Keyboard, "REAL crossing ... out\n");
|
DEBUG_TRACE (DEBUG::Keyboard, "REAL crossing ... out\n");
|
||||||
|
|
|
@ -493,9 +493,10 @@ Parser::scanner (unsigned char inbyte)
|
||||||
|
|
||||||
case NEEDTWOBYTES:
|
case NEEDTWOBYTES:
|
||||||
/* wait for the second byte */
|
/* wait for the second byte */
|
||||||
if (msgindex < 3)
|
if (msgindex < 3) {
|
||||||
return;
|
return;
|
||||||
/*FALLTHRU*/
|
}
|
||||||
|
/* fallthrough */
|
||||||
|
|
||||||
case NEEDONEBYTE:
|
case NEEDONEBYTE:
|
||||||
/* We've completed a 1 or 2 byte message. */
|
/* We've completed a 1 or 2 byte message. */
|
||||||
|
|
|
@ -959,7 +959,7 @@ FaderPort8::filter_stripables (StripableList& strips) const
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert (0);
|
assert (0);
|
||||||
// fall through
|
/* fallthrough */
|
||||||
case MixAll:
|
case MixAll:
|
||||||
allow_master = true;
|
allow_master = true;
|
||||||
flt = &flt_all;
|
flt = &flt_all;
|
||||||
|
|
|
@ -1816,49 +1816,56 @@ OSC::surface_parse (const char *path, const char* types, lo_arg **argv, int argc
|
||||||
} else {
|
} else {
|
||||||
linkid = argv[8]->i;
|
linkid = argv[8]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 8:
|
case 8:
|
||||||
if (types[7] == 'f') {
|
if (types[7] == 'f') {
|
||||||
linkset = (int) argv[7]->f;
|
linkset = (int) argv[7]->f;
|
||||||
} else {
|
} else {
|
||||||
linkset = argv[7]->i;
|
linkset = argv[7]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 7:
|
case 7:
|
||||||
if (types[6] == 'f') {
|
if (types[6] == 'f') {
|
||||||
port = (int) argv[6]->f;
|
port = (int) argv[6]->f;
|
||||||
} else {
|
} else {
|
||||||
port = argv[6]->i;
|
port = argv[6]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 6:
|
case 6:
|
||||||
if (types[5] == 'f') {
|
if (types[5] == 'f') {
|
||||||
pi_page = (int) argv[5]->f;
|
pi_page = (int) argv[5]->f;
|
||||||
} else {
|
} else {
|
||||||
pi_page = argv[5]->i;
|
pi_page = argv[5]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 5:
|
case 5:
|
||||||
if (types[4] == 'f') {
|
if (types[4] == 'f') {
|
||||||
se_page = (int) argv[4]->f;
|
se_page = (int) argv[4]->f;
|
||||||
} else {
|
} else {
|
||||||
se_page = argv[4]->i;
|
se_page = argv[4]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 4:
|
case 4:
|
||||||
if (types[3] == 'f') {
|
if (types[3] == 'f') {
|
||||||
fadermode = (int) argv[3]->f;
|
fadermode = (int) argv[3]->f;
|
||||||
} else {
|
} else {
|
||||||
fadermode = argv[3]->i;
|
fadermode = argv[3]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 3:
|
case 3:
|
||||||
if (types[2] == 'f') {
|
if (types[2] == 'f') {
|
||||||
feedback = (int) argv[2]->f;
|
feedback = (int) argv[2]->f;
|
||||||
} else {
|
} else {
|
||||||
feedback = argv[2]->i;
|
feedback = argv[2]->i;
|
||||||
}
|
}
|
||||||
// [[fallthrough]]; old compiler doesn't like
|
/* fallthrough */
|
||||||
case 2:
|
case 2:
|
||||||
if (types[1] == 'f') {
|
if (types[1] == 'f') {
|
||||||
strip_types = (int) argv[1]->f;
|
strip_types = (int) argv[1]->f;
|
||||||
} else {
|
} else {
|
||||||
strip_types = argv[1]->i;
|
strip_types = argv[1]->i;
|
||||||
}
|
}
|
||||||
|
/* fallthrough */
|
||||||
case 1:
|
case 1:
|
||||||
if (types[0] == 'f') {
|
if (types[0] == 'f') {
|
||||||
bank_size = (int) argv[0]->f;
|
bank_size = (int) argv[0]->f;
|
||||||
|
|
|
@ -1315,9 +1315,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
|
||||||
icon_transport_panic (cr, width, height);
|
icon_transport_panic (cr, width, height);
|
||||||
break;
|
break;
|
||||||
case TransportStart:
|
case TransportStart:
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case TransportEnd:
|
case TransportEnd:
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case TransportRange:
|
case TransportRange:
|
||||||
icon_transport_ck (cr, icon, width, height);
|
icon_transport_ck (cr, icon, width, height);
|
||||||
break;
|
break;
|
||||||
|
@ -1352,9 +1352,9 @@ ArdourWidgets::ArdourIcon::render (cairo_t *cr,
|
||||||
icon_nudge_right (cr, width, height, fg_color);
|
icon_nudge_right (cr, width, height, fg_color);
|
||||||
break;
|
break;
|
||||||
case ZoomIn:
|
case ZoomIn:
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case ZoomOut:
|
case ZoomOut:
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case ZoomFull:
|
case ZoomFull:
|
||||||
icon_zoom (cr, icon, width, height, fg_color);
|
icon_zoom (cr, icon, width, height, fg_color);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -274,7 +274,7 @@ int main (int argc, char* argv[])
|
||||||
settings._sample_format = ExportFormatBase::SF_Float;
|
settings._sample_format = ExportFormatBase::SF_Float;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Invalid Bit Depth\n");
|
fprintf(stderr, "Invalid Bit Depth\n");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -155,10 +155,11 @@ class LuaTableRef {
|
||||||
// invalid userdata -- fall through
|
// invalid userdata -- fall through
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fall through */
|
/* fallthrough */
|
||||||
case LUA_TFUNCTION: // no support -- we could... string.format("%q", string.dump(value, true))
|
case LUA_TFUNCTION: // no support -- we could... string.format("%q", string.dump(value, true))
|
||||||
case LUA_TTABLE: // no nested tables, sorry.
|
case LUA_TTABLE: // no nested tables, sorry.
|
||||||
case LUA_TNIL: // fallthrough
|
case LUA_TNIL:
|
||||||
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
// invalid value
|
// invalid value
|
||||||
lua_pop (L, 2);
|
lua_pop (L, 2);
|
||||||
|
|
Loading…
Reference in New Issue