Fix various clang 23 unused warnings
Categories
(Core :: General, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: RyanVM, Assigned: RyanVM)
References
(Blocks 1 open bug)
Details
Attachments
(6 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.
- ipc:
STLStringToCFStringWithEncodingsTinipc/chromium/src/base/sys_string_conversions_mac.mm. Bug 913953 removed its callers in 2013 and missed the helper; remove it. - extensions/auth:
gssNativeImpinextensions/auth/nsAuthGSSAPI.cppis only read on macOS; move it and its writes underXP_MACOSX. - media/gmp-clearkey:
sCanReadHostVerificationFilesinmedia/gmp-clearkey/0.1/gmp-clearkey.cppis only read inMOZILLA_OFFICIALbuilds; guard the definition the same way. - widget/gtk: the
ca_proplist_*bindings inwidget/gtk/nsSound.cppare looked up but never called; drop them, and only look upca_context_set_driveron configurations that call it. - browser/app:
gIsBackgroundTaskinbrowser/app/nsBrowserApp.cppis only read by the WindowsOutput()path; define it under the same condition. - toolkit/crashreporter: Breakpad's
LookupSymbolinbreakpad-client/mac/handler/dynamic_images.cchas no callers; remove it along withbreakpad_nlist_64.{cc,h}, which existed only for it.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Bug 913953 removed its callers in 2013, and clang 23.1.0 now reports unused internal-linkage
templates under -Wall.
| Assignee | ||
Comment 2•2 months ago
|
||
Only the macOS Kerberos ticket check reads it.
| Assignee | ||
Comment 3•2 months ago
|
||
Only the MOZILLA_OFFICIAL host verification path reads it.
| Assignee | ||
Comment 4•2 months ago
|
||
ca_context_set_driver is only needed when ALSA or sndio support is compiled in, so guard it the same way
as its caller.
| Assignee | ||
Comment 5•2 months ago
|
||
Upstream still calls LookupSymbol from GetDyldAllImageInfosPointer, but Bug 1814852 replaced that code
here, leaving the template and the nlist reader it wrapped without callers.
| Assignee | ||
Comment 6•2 months ago
|
||
Console builds never read it because MOZ_WINCONSOLE takes precedence in Output().
Updated•2 months ago
|
Comment 8•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/9e8889b3ef95
https://hg.mozilla.org/mozilla-central/rev/a2c16b6e8fa1
https://hg.mozilla.org/mozilla-central/rev/52d1b9a9d01d
https://hg.mozilla.org/mozilla-central/rev/dd362b2bcfe1
https://hg.mozilla.org/mozilla-central/rev/163272c20952
https://hg.mozilla.org/mozilla-central/rev/59c54100e6cb
Updated•2 months ago
|
Description
•