Closed Bug 2060535 Opened 3 months ago Closed 3 months ago

gIsBackgroundTask in nsBrowserApp.cpp is set but never read on non-Windows

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr140 unaffected, firefox-esr153 wontfix, firefox153 wontfix, firefox154 wontfix, firefox155 fixed)

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- wontfix
firefox153 --- wontfix
firefox154 --- wontfix
firefox155 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 external file)

gIsBackgroundTask is only ever read by Output, and only in the Windows branch where it decides whether to pop up a message box. On Linux and macOS it is assigned in main and never read, which -Wunused-but-set-global (new in clang 22, being enabled in bug 2060534) flags:

browser/app/nsBrowserApp.cpp:108:13: error: variable 'gIsBackgroundTask' set but not used [-Werror,-Wunused-but-set-global]
  108 | static bool gIsBackgroundTask = false;
      |             ^

Fix by guarding gIsBackgroundTask, its assignment in main, and the HasFlag helper on XP_WIN in addition to MOZ_BACKGROUNDTASKS.

gIsBackgroundTask is only ever read by Output, and only on Windows, where
it decides whether to pop up a message box. Elsewhere it is set and never read,
which -Wunused-but-set-global (new in clang 22) flags.

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Product: Firefox → Firefox Build System

Set release status flags based on info from the regressing bug 1992267

Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
Duplicate of this bug: 2052079
Blocks: clang-23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: