lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: silence C++ warnings (issue 231370043 by address@hidden)


From: nine . fierce . ballads
Subject: Re: silence C++ warnings (issue 231370043 by address@hidden)
Date: Tue, 05 May 2015 00:30:05 +0000


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()));
On 2015/05/05 00:11:06, dak wrote:
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.

OK, I'll revert this one and leave it for someone more familiar with the
code.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]