Project

General

Profile

Bug #851728

advance_name_for_player() & advance_name_by_player() return address of local variable

Added by Marko Lindqvist 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Category:
General
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Reported by gcc-10 from S2_5. Other branches presumably affected. advance_name_for_player() and advance_name_by_player() may return address of local 'char buffer[]'.

History

#1 Updated by Marko Lindqvist 7 months ago

  • Status changed from In Progress to New
  • Target version deleted (2.5.12)

I think (development version of) compiler misdiagnoses the code.

#2 Updated by Marko Lindqvist 7 months ago

  • Target version set to 2.6.2

#3 Updated by Marko Lindqvist 7 months ago

After much playing around with the code and the compiler I'm more convinced that it's the compiler that is acting up. Still, refactoring the code to something I consider also cleaner makes the warning to go away, so it shouldn't hurt.

#4 Updated by Marko Lindqvist 7 months ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF