Closed Bug 1487168 Opened Last year Closed Last year

clang-cl.exe warns that ShouldShowFocusRingIfFocusedByMouse() is unused on windows

Categories

(Core :: DOM: Core & HTML, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When building with clang-cl.exe on Windows, I got a build warning that nsGlobalWindowInner.cpp's function "ShouldShowFocusRingIfFocusedByMouse" is unused (-Wunused-function).

This function only has one caller, which happens to be #ifndef XP_WIN.

Let's make its definition have that same guard, so that it's only defined on the platforms where it's called & so we don't get these unused function build warnings.
Blocks: buildwarning
Priority: -- → P5
Comment on attachment 9004972 [details]
Bug 1487168: Give ShouldShowFocusRingIfFocusedByMouse() an #ifndef guard to match its caller & to avoid -Wunused-function build warning. r=smaug

Olli Pettay [:smaug] has approved the revision.
Attachment #9004972 - Flags: review+
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d6495af4aa9
Give ShouldShowFocusRingIfFocusedByMouse() an #ifndef guard to match its caller & to avoid -Wunused-function build warning. r=smaug
https://hg.mozilla.org/mozilla-central/rev/1d6495af4aa9
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Can I remove AllowCompilerWarnings() from dom/base/moz.build?
If it passes an all-platforms Try run, then it's presumably fine!
Assignee: nobody → dholbert
(Ah, I see that AllowCompilerWarnings() is clang-on-windows specific and is tagged as "workaround for bug 1090497".  I don't know offhand whether this was the last/only warning in that directory or not, so I don't know whether it's removable at this point.)
Depends on: 1487657
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.