https://codereview.appspot.com/231370043/diff/1/lily/beaming-pattern.cc
File lily/beaming-pattern.cc (right):

https://codereview.appspot.com/231370043/diff/1/lily/beaming-pattern.cc#newcode170
lily/beaming-pattern.cc:170: int start_dur =
intlog2(static_cast<int>(infos_[i+1].start_moment_.main_part_.den()));
intlog2(0) aborts the program.  So if den is some large power of 2 that
converted into int is 0, one can trigger an abort here.

In other words: GCC might have a point here.  I don't know how likely
the code is to fall apart for other kinds of overflow though.

https://codereview.appspot.com/231370043/diff/1/lily/page-breaking.cc
File lily/page-breaking.cc (right):

https://codereview.appspot.com/231370043/diff/1/lily/page-breaking.cc#newcode1136
lily/page-breaking.cc:1136: || (prev && scm_is_eq
(prev->page_permission_, ly_symbol2scm ("force"))))
Yes, this one annoyed me a few times as well but then it scrolled off
and I forgot looking after it.

Maybe we should enable compilation with warning-as-errors and switch it
off for parser.cc (since the warning in the generated code can't be
avoided using sensible means).

https://codereview.appspot.com/231370043/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to