mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
add abort() to non-reached code
This cleans up a lot of false-positives in static analysis and also helps compilers to optimize code paths in general. (tagging the fatal stingstream operator as ‘noreturn’ is far less trivial)
This commit is contained in:
parent
5d5d9cb9e2
commit
6b3a8915f3
48 changed files with 121 additions and 125 deletions
|
|
@ -1346,8 +1346,7 @@ Sequence<Time>::get_notes_by_pitch (Notes& n, NoteOperator op, uint8_t val, int
|
|||
|
||||
default:
|
||||
//fatal << string_compose (_("programming error: %1 %2", X_("get_notes_by_pitch() called with illegal operator"), op)) << endmsg;
|
||||
abort ();
|
||||
/* NOTREACHED*/
|
||||
abort(); /* NOTREACHED*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1392,8 +1391,7 @@ Sequence<Time>::get_notes_by_velocity (Notes& n, NoteOperator op, uint8_t val, i
|
|||
break;
|
||||
default:
|
||||
// fatal << string_compose (_("programming error: %1 %2", X_("get_notes_by_velocity() called with illegal operator"), op)) << endmsg;
|
||||
abort ();
|
||||
/* NOTREACHED*/
|
||||
abort(); /* NOTREACHED*/
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue