Closed Bug 1279608 Opened 3 years ago Closed 3 years ago

widget/nsBaseWidget.cpp:250:1: error: unused function 'PRTimeToSeconds' [-Werror,-Wunused-function], in --disable-accessibility build

Categories

(Core :: Widget, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

Build error, in a build with "ac_add_options --disable-accessibility"

/widget/nsBaseWidget.cpp:250:1: error: unused function 'PRTimeToSeconds' [-Werror,-Wunused-function]

This function's only used once, and that one usage is in an #ifdef ACCESSIBILITY section. So, its definition should be #ifdef ACCESSIBILITY as well.  (It used to be #ifdefed like that, but that changed this cset for bug 1234210:
  https://hg.mozilla.org/mozilla-central/rev/a65ccabdef2e#l1.93
...which moved it out of an #ifdef ACCESSIBILITY block because it was adding a non-ACCESSIBILITY-guarded call to that function.

But, that non-guarded call was removed in bug 1260190:
  https://hg.mozilla.org/mozilla-central/rev/d40c605a68b2#l3.53
(or rather, it moved to a guarded section of the file)

So now we should return PRTimeToSeconds to being ACCESSIBILITY-guarded like it originally was.
As shown in mozreview, this is just moving code around, and it's moving this code back to where it was before bug 1234210. (so it ends up directly above the function where its usages live.)
Assignee: nobody → dholbert
Summary: widget/nsBaseWidget.cpp:250:1: error: unused function 'PRTimeToSeconds' [-Werror,-Wunused-function] → widget/nsBaseWidget.cpp:250:1: error: unused function 'PRTimeToSeconds' [-Werror,-Wunused-function], in --disable-accessibility build
Comment on attachment 8762157 [details]
Bug 1279608: Move nsBaseWidget.cpp's PRTimeToSeconds and kAccessibilityLastRunDatePref definitions inside the same #ifdef guard where their usages are.

https://reviewboard.mozilla.org/r/59022/#review56728
Attachment #8762157 - Flags: review?(jmathies) → review+
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb5d01073c32
Move nsBaseWidget.cpp's PRTimeToSeconds and kAccessibilityLastRunDatePref definitions inside the same #ifdef guard where their usages are. r=jimm
https://hg.mozilla.org/mozilla-central/rev/eb5d01073c32
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.