Closed Bug 825096 Opened 12 years ago Closed 12 years ago

Fix three clang warnings in accessible/.

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file)

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'...
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
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: