Dangerous type casts to ClientData
Open2997087fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 13 years ago
Descriptionplain2010-05-05 11:52:42
In tclPkg.c I encountered a
const char *versionToProvide
which should not have been const at all. The reason
that the compiler did not complain were type
casts to (ClientData). The danger of such type
casts is that the casted pointer could be "const",
and then the const'ness is cast away silencing
the compiler.
So, I scanned the code for casts to ClientData.
The bug in tclPkg.c is the only bug I found,
but many casts to ClientData simply are
not necessary at all. Here is a patch which
removes all unnecessary type casts to ClientData.
nijtmansplain2010-05-05 18:54:20
File Added - 372922: typecast.patch
jan.nijtmans Ticket [2997087fff]: 1 change
[History diff]2014-02-21 19:09:31
jan.nijtmans Ticket [2997087fff]: 1 change
[History diff]2014-02-21 19:12:40
Log in (anonymous is fine) to add a comment.
Attachments:
- typecast.patch [download] added by nijtmans on 2010-05-05 18:54:19. [details]