Closed Bug 896032 Opened 7 years ago Closed 7 years ago

nsGtkKeyUtils.cpp:552:18: warning: unused variable 'rv' [-Wunused-variable]

Categories

(Core :: Widget: Gtk, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Build (warning when building on Linux, with clang):
> widget/gtk2/nsGtkKeyUtils.cpp:552:18: warning: unused variable 'rv' [-Wunused-variable]
>   nsresult rv = CallGetService("@mozilla.org/widget/bidikeyboard;1", &sBidiKeyboard);

This was added last week for Bug 817508, here:
 http://hg.mozilla.org/mozilla-central/rev/1adc72e64db0#l3.70

Sine this is in a function that returns void, I'm not sure if we can usefully react to failures in 'rv'. Maybe we should just directly invoke CallGetService, and not bother capturing its return value? We do that in several places elsewhere, FWIW.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #778646 - Flags: review?(smontagu)
Comment on attachment 778646 [details] [diff] [review]
fix v1: drop 'rv'

Review of attachment 778646 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for picking this up. I had made the same change myself at the last minute (after the change Karl requested in bug 817508 comment 12 left the rv hanging) but obviously forgot to refresh the patch.
Attachment #778646 - Flags: review?(smontagu) → review+
Thanks! Incidentally, this leaves this directory build-warning-free, as shown by this Try run w/ an additional FAIL_ON_WARNINGS patch:
 https://tbpl.mozilla.org/?tree=Try&rev=a91dc7de7077

I'll file a followup bug on doing that annotation.
https://hg.mozilla.org/mozilla-central/rev/c525538afb69
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.