Fix three clang warnings in accessible/.

RESOLVED FIXED in mozilla20

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

unspecified
mozilla20
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
clang 3.2. warns:

  accessible/src/base/AccEvent.cpp:120:57 [-Wlogical-op-parentheses] '&&' within '||'

  accessible/src/base/NotificationController.cpp:644:18 [-Wunused-variable] unused variable 'document'

  accessible/src/base/nsAccessibilityService.cpp:1306:11 [-Wswitch] 7 enumeration values not handled in switch: 'eApplicationType', 'eImageMapType', 'eMenuPopupType'...
(Assignee)

Comment 1

6 years ago
Created attachment 696171 [details] [diff] [review]
Fix three clang warnings in accessible/.

This patch fixes the warnings.  I know nothing about this code so please check
it closely.  (I also haven't yet tested it, though I will do so before
landing.)

The first one looks like a genuine bug.  I refactored the code slightly.

For the second, I have assumed that GetDocAccessible() has no side-effects.  (I
couldn't work out which GetDocAccessible() function was being called here.)

For the third, I don't know if these enumeration values should be handled.
Asserting in their presence seems reasonable.  MOZ_CRASH() would be more
emphatic, and I'd be happy to change it to that.
Attachment #696171 - Flags: review?(surkov.alexander)
Attachment #696171 - Flags: review?(surkov.alexander) → review+
https://hg.mozilla.org/mozilla-central/rev/1e5c46117dc5
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.