Closed Bug 2069469 Opened 2 months ago Closed 2 months ago

Fix various clang 23 unused warnings

Categories

(Core :: General, task)

task

Tracking

()

RESOLVED FIXED
157 Branch
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: STLStringToCFStringWithEncodingsT in ipc/chromium/src/base/sys_string_conversions_mac.mm. Bug 913953 removed its callers in 2013 and missed the helper; remove it.
  • extensions/auth: gssNativeImp in extensions/auth/nsAuthGSSAPI.cpp is only read on macOS; move it and its writes under XP_MACOSX.
  • media/gmp-clearkey: sCanReadHostVerificationFiles in media/gmp-clearkey/0.1/gmp-clearkey.cpp is only read in MOZILLA_OFFICIAL builds; guard the definition the same way.
  • widget/gtk: the ca_proplist_* bindings in widget/gtk/nsSound.cpp are looked up but never called; drop them, and only look up ca_context_set_driver on configurations that call it.
  • browser/app: gIsBackgroundTask in browser/app/nsBrowserApp.cpp is only read by the Windows Output() path; define it under the same condition.
  • toolkit/crashreporter: Breakpad's LookupSymbol in breakpad-client/mac/handler/dynamic_images.cc has no callers; remove it along with breakpad_nlist_64.{cc,h}, which existed only for it.
Component: IPC → General
Summary: Remove the unused STLStringToCFStringWithEncodingsT helper to fix -Wunused-template with clang 23 → Fix various clang 23 unused warnings

Bug 913953 removed its callers in 2013, and clang 23.1.0 now reports unused internal-linkage
templates under -Wall.

Only the MOZILLA_OFFICIAL host verification path reads it.

ca_context_set_driver is only needed when ALSA or sndio support is compiled in, so guard it the same way
as its caller.

Upstream still calls LookupSymbol from GetDyldAllImageInfosPointer, but Bug 1814852 replaced that code
here, leaving the template and the nlist reader it wrapped without callers.

Console builds never read it because MOZ_WINCONSOLE takes precedence in Output().

Attachment #9637143 - Attachment description: Bug 2069469 - Make gssNativeImp macOS-only. r?#necko-reviewers → Bug 2069469 - Turn network.negotiate-auth.using-native-gsslib into a macOS-only StaticPref. r?#necko-reviewers
Pushed by rvandermeulen@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a6f08c479cdc https://hg.mozilla.org/integration/autoland/rev/9e8889b3ef95 Remove the unused STLStringToCFStringWithEncodingsT helper. r=ipc-reviewers,mccr8 https://github.com/mozilla-firefox/firefox/commit/220feefd4a29 https://hg.mozilla.org/integration/autoland/rev/a2c16b6e8fa1 Turn network.negotiate-auth.using-native-gsslib into a macOS-only StaticPref. r=necko-reviewers,valentin https://github.com/mozilla-firefox/firefox/commit/faf7727b9235 https://hg.mozilla.org/integration/autoland/rev/52d1b9a9d01d Only define sCanReadHostVerificationFiles in official builds. r=media-playback-reviewers,padenot https://github.com/mozilla-firefox/firefox/commit/7ce79ba4f90d https://hg.mozilla.org/integration/autoland/rev/dd362b2bcfe1 Drop the unused libcanberra proplist bindings. r=gtk-reviewers,emilio https://github.com/mozilla-firefox/firefox/commit/3a990ebd786e https://hg.mozilla.org/integration/autoland/rev/163272c20952 Remove Breakpad's unused LookupSymbol and breakpad_nlist. r=afranchuk https://github.com/mozilla-firefox/firefox/commit/174eb0053a0b https://hg.mozilla.org/integration/autoland/rev/59c54100e6cb Only define gIsBackgroundTask when Output() can read it. r=win-reviewers,gstoll
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: