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:
Robin Gareus 2014-11-14 10:47:43 +01:00
parent 5d5d9cb9e2
commit 6b3a8915f3
48 changed files with 121 additions and 125 deletions

View file

@ -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*/
}
}