Ticket #45541

pick_random_tech_to_lose() compile error

Eröffnet am: 2022-09-01 08:45 Letztes Update: 2022-10-09 11:30

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
2

Details

I've got a compile error from pick_random_tech_to_lose() on a meson based build with -Doptimization=3, and gcc-12.

This looks somewhat familiar. Likely this is what we resolved with #42885 for the autotools side. What I didn't realize at the time autotools failure was being investigated is that advance_count(); is not called ONLY within the iterator macro, but pick_random_tech_to_lose() calls it also before the iteration. That's another reason for the compiler to be worried about its return values.

Ticket-Verlauf (3/8 Historien)

2022-09-01 08:45 Aktualisiert von: cazfi
  • New Ticket "pick_random_tech_to_lose() compile error" created
2022-09-01 10:35 Aktualisiert von: cazfi
Kommentar

Reply To cazfi

What I didn't realize at the time autotools failure was being investigated is that advance_count(); is not called ONLY within the iterator macro, but pick_random_tech_to_lose() calls it also before the iteration. That's another reason for the compiler to be worried about its return values.

That was not the main issue here, but raised #45542 about it - I got mostly ready patch for it, when testing various things, anyway.

2022-09-01 10:57 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
  • Meilenstein Update from (Keine) to 3.1.0 (closed)
  • Komponente Update from (Keine) to General
Kommentar

I don't think we need this to S3_0 at the moment. There's no meson based build there, and autotools based build usually has the relevant warning turned off. Though it's possible that we need this later, for clang analyzer builds that handle compiler flags a bit differently from normal build.

2022-09-07 06:26 Aktualisiert von: cazfi
Kommentar

Targeting to S3_0 after all, but only after 3.0.4 release (in 3.0.5 cycle). Patch attached. Will not wait with S3_1 and master, but push those ones soon.

2022-09-07 10:50 Aktualisiert von: cazfi
Kommentar

Reply To cazfi

Will not wait with S3_1 and master, but push those ones soon.

Pushed.

2022-10-09 11:30 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

Please login to add comment to this ticket » Anmelden