Request::get_base_required_time: WARNING nr = 1 but count is 1, which is not allowed according to the comment for this function

Bug #601400 reported by Marty Shannon on 2010-07-03
This bug affects 5 people
Affects Status Importance Assigned to Milestone

Bug Description

I'm pretty sure I've been seeing this since at least Release 15, but for certain it's in bzr5412. It happens a *lot*.

Related branches

Nasenbaer (nasenbaer) on 2010-07-03
Changed in widelands:
status: New → Confirmed
Scott Howard (showard314) wrote :

Quick skim of the code: in, should the warning be thrown if (m_count < nr) not when (m_count <= nr)? I believe that the number requested can equal to the maximum size. See the original code below:

 * Return the point in time at which we want the item of the given number to
 * be delivered. nr is in the range [0..m_count[
int32_t Request::get_base_required_time
 (Editor_Game_Base & egbase, uint32_t const nr) const
 if (m_count <= nr)
   ("Request::get_base_required_time: WARNING nr = %u but count is %u, "
    "which is not allowed according to the comment for this function\n",
    nr, m_count);
 int32_t const curtime = egbase.get_gametime();

David Allwicher (aber) on 2011-03-25
Changed in widelands:
milestone: none → build16-rc1
SirVer (sirver) wrote :

not critical. -> build 17

Changed in widelands:
importance: Undecided → Low
milestone: build16-rc1 → build17-rc1
David Allwicher (aber) on 2011-04-06
Changed in widelands:
status: Confirmed → In Progress
Hans Joachim Desserud (hjd) wrote :

I'm happy someone has finally looked at this, since this warning pops up all the time. Though, for the future it would probably be better to push fixes to different bugs to different branches, to make it easier to review and merge them one at a time.

David Allwicher (aber) on 2011-05-02
Changed in widelands:
status: In Progress → Fix Committed
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers