Closed
Bug 1577657
Opened 5 years ago
Closed 5 years ago
Address MSVC warning C4312
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1573097
People
(Reporter: mt, Unassigned)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
4.13 KB,
text/plain
|
Details |
c:\code\nss\lib\ckfw\instance.c(796): warning C4312: 'type cast': conversion from 'CK_OBJECT_HANDLE' to 'const void *' of greater size
Right now, these warnings are not especially common, but there are a few files that generate quite a few. The problem is that we are putting an integer value into pointer slot. We do that to avoid an allocation (and the associated management). But we need to do two things:
-
Ensure that
CK_OBJECT_HANDLE
(or whatever type is used) fits invoid*
withPR_STATIC_ASSERT
. -
Wrap all these conversions with a macro that converts via
uintptr_t
. -
Turn these warnings into errors so we don't get more of them.
This is largely mechanical.
Reporter | ||
Comment 1•5 years ago
|
||
The complete set of warnings isn't that long:
```
Updated•5 years ago
|
Type: task → defect
Priority: -- → P3
Reporter | ||
Comment 2•5 years ago
•
|
||
I have a habit of opening duplicates of my own bugs.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•