Closed
Bug 785226
Opened 12 years ago
Closed 12 years ago
warning spam: accessible/src/base/RoleMap.h:10:1: warning: comparison between 'enum mozilla::a11y::roles::Role' and 'enum nsIAccessibleRole::<anonymous>' [-Wenum-compare]
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: froydnj, Assigned: froydnj)
References
Details
Attachments
(1 file)
948 bytes,
patch
|
davidb
:
review+
|
Details | Diff | Splinter Review |
This warning is semi-annoying, seen under GCC. Patch coming momentarily.
Assignee | ||
Comment 1•12 years ago
|
||
Simple patch. I opted for casting to uint32_t rather than one or the other of the enums because I wasn't sure if casting to one of the enums might provoke weird behavior.
Attachment #654787 -
Flags: review?(dbolter)
Comment 2•12 years ago
|
||
Comment on attachment 654787 [details] [diff] [review] patch Review of attachment 654787 [details] [diff] [review]: ----------------------------------------------------------------- I'm fine with this but I'm hoping Trevor is as well.
Attachment #654787 -
Flags: review?(trev.saunders)
Attachment #654787 -
Flags: review?(dbolter)
Attachment #654787 -
Flags: review+
Updated•12 years ago
|
Component: General → Disability Access APIs
Updated•12 years ago
|
Assignee: nobody → nfroyd
Comment 3•12 years ago
|
||
Comment on attachment 654787 [details] [diff] [review] patch > #define ROLE(geckoRole, stringRole, atkRole, macRole, msaaRole, ia2Role, nameRule) \ >- MOZ_STATIC_ASSERT(roles::geckoRole == nsIAccessibleRole::ROLE_ ## geckoRole, "internal and xpcom roles differ!"); >+ MOZ_STATIC_ASSERT(static_cast<uint32_t>(roles::geckoRole) == static_cast<uint32_t>(nsIAccessibleRole::ROLE_ ## geckoRole), \ >+ "internal and xpcom roles differ!"); nit, you break 80 char restriction. otherwise seems fine.
Attachment #654787 -
Flags: review?(trev.saunders)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #3) > > #define ROLE(geckoRole, stringRole, atkRole, macRole, msaaRole, ia2Role, nameRule) \ > >- MOZ_STATIC_ASSERT(roles::geckoRole == nsIAccessibleRole::ROLE_ ## geckoRole, "internal and xpcom roles differ!"); > >+ MOZ_STATIC_ASSERT(static_cast<uint32_t>(roles::geckoRole) == static_cast<uint32_t>(nsIAccessibleRole::ROLE_ ## geckoRole), \ > >+ "internal and xpcom roles differ!"); > > nit, you break 80 char restriction. I wrapped the equality check; it still breaks 80 chars, but the added line is shorter than the #define (which already breaks the restriction), I don't feel too bad about this. https://hg.mozilla.org/integration/mozilla-inbound/rev/8aa9e479b24f
Status: NEW → ASSIGNED
Comment 5•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8aa9e479b24f
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in
before you can comment on or make changes to this bug.
Description
•