Closed Bug 345421 Opened 16 years ago Closed 16 years ago

nsRoleMap.h uses -1 for PRUint32

Categories

(Firefox :: Disability Access, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ginnchen+exoracle, Assigned: gaomingcn)

References

Details

(Keywords: access)

Attachments

(1 file)

e.g. accessible/src/atk/nsRoleMap.h
 
44 #define ROLE_ATK_LAST_ENTRY -1
47 PRUint32 atkRoleMap[] = {
...
243     ROLE_ATK_LAST_ENTRY          // nsIAccessible::ROLE_LAST_ENTRY
244 };
So? That is pretty common practise. Because it is unsigned, it will wrap around to the highest number possible in the number of bits available.
Probably creates an annoying warning though. At least we should cast it.
Attached patch patch of the fixSplinter Review
Attachment #230330 - Flags: review?(aaronleventhal)
Comment on attachment 230330 [details] [diff] [review]
patch of the fix

Thanks, that was my mistake.
Attachment #230330 - Flags: review?(aaronleventhal) → review+
Aaron, should we use const instead of #define ?

Probably, I just used #define out of old C habits. Ming Gao, check in with const, no review necessary.
checked in
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.