Closed Bug 2069672 Opened 2 months ago Closed 2 months ago

Fix clang 23 unused warnings in dom

Categories

(Core :: DOM: Core & HTML, task)

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: RyanVM, Assigned: RyanVM)

References

(Blocks 1 open bug)

Details

Attachments

(3 external files)

clang 23.1.0 puts -Wunused-template under -Wall and nests -Wunused-but-set-global under -Wunused-but-set-variable, so internal-linkage templates a translation unit never instantiates and file-scope statics that are written but never read both become -Werror failures. Three dom sites, one patch per reviewer group:

  • dom/simpledb: QuotaClient::sInstance in dom/simpledb/ActorsParent.cpp is only read by assertions; make it debug-only.
  • dom/base: sPopupStatePusherCount in dom/base/PopupBlocker.cpp is only read by assertions; make it debug-only.
  • dom/workers: UniquePtrComparator and GetUniquePtrComparator in dom/workers/WorkerPrivate.cpp have no callers; remove them.

They have no callers, and clang 23.1.0 reports unused internal-linkage templates under -Wall.

Pushed by rvandermeulen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/3389c073d10a https://hg.mozilla.org/integration/autoland/rev/a95d52084c1c Make simpledb's QuotaClient::sInstance debug-only. r=dom-storage-reviewers,janv https://github.com/mozilla-firefox/firefox/commit/199ee8ff91a9 https://hg.mozilla.org/integration/autoland/rev/836dc5593d7b Make sPopupStatePusherCount debug-only. r=dom-core-reviewers,smaug https://github.com/mozilla-firefox/firefox/commit/d3725bb6765b https://hg.mozilla.org/integration/autoland/rev/31a2ecd6b8fb Remove the unused UniquePtrComparator helpers from WorkerPrivate.cpp. r=dom-worker-reviewers,asuth
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: