Closed
Bug 18635
Opened 25 years ago
Closed 25 years ago
nsBasePrincipal.cpp attempts illegal cast
Categories
(Core :: Security: CAPS, defect, P3)
Tracking
()
People
(Reporter: tor, Assigned: norrisboyd)
Details
The SUNWspro 4.2 compilers don't like casting directly from a void* to a short: "/cs/src/mozilla/mozilla/caps/src/nsBasePrincipal.cpp", line 64: Error: Cannot cast from void* to short. Casting through an intermediate long makes the compiler happy: Index: nsBasePrincipal.cpp =================================================================== RCS file: /cvsroot/mozilla/caps/src/nsBasePrincipal.cpp,v retrieving revision 1.1 diff -u -r1.1 nsBasePrincipal.cpp --- nsBasePrincipal.cpp 1999/11/11 22:10:34 1.1 +++ nsBasePrincipal.cpp 1999/11/12 01:25:53 @@ -61,7 +61,7 @@ return NS_OK; } nsStringKey key(capability); - *result = (PRInt16) mCapabilities->Get(&key); + *result = (PRInt16)(long)mCapabilities->Get(&key); if (!*result) *result = nsIPrincipal::ENABLE_UNKNOWN; return NS_OK;
Assignee | ||
Comment 1•25 years ago
|
||
What about casting through an int instead? Casting through a long seems odd for machines where long is 64 bits but void * is 32.
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 3•25 years ago
|
||
Checked in fix. *** This bug has been marked as a duplicate of 18640 ***
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
[bugday] verified dupe. different compilers but same bug.
Moving all CAPS bugs to Security: CAPS component. CAPS component will be deleted.
Component: CAPS → Security: CAPS
You need to log in
before you can comment on or make changes to this bug.
Description
•