Closed
Bug 2069467
Opened 2 months ago
Closed 2 months ago
Fix clang 23 unused warnings in xpcom
Categories
(Core :: XPCOM, task)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
157 Branch
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: RyanVM, Assigned: RyanVM)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
clang 23.1.0 puts -Wunused-template under -Wall and nests -Wunused-but-set-global under -Wunused-but-set-variable. Two sites in xpcom trip them:
xpcom/tests/gtest/TestTArray2.cpp:984:13: error: unused function template 'is_heap' [-Werror,-Wunused-template]
The helper has had nothing to test since bug 1271751 removed the heap functions from nsTArray in 2016; remove it.
gDumpedStatistics in xpcom/base/nsTraceRefcnt.cpp is written unconditionally but only read by a MOZ_ASSERT, so non-debug builds see a write-only global. Move the variable and its write under #ifdef DEBUG alongside the assertion.
| Assignee | ||
Updated•2 months ago
|
Summary: Remove the unused is_heap helper from TestTArray2.cpp to fix -Wunused-template with clang 23 → Fix clang 23 unused warnings in xpcom
| Assignee | ||
Comment 1•2 months ago
|
||
TestTArray2.cpp's is_heap helper has no callers, and nsTraceRefcnt.cpp's gDumpedStatistics only exists
for an assertion.
Pushed by rvandermeulen@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/6367311ab58a
https://hg.mozilla.org/integration/autoland/rev/db1fa9cd6380
Fix clang 23 unused warnings in xpcom. r=xpcom-reviewers,mccr8
Comment 3•2 months ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 2 months ago
status-firefox157:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•