Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-02-21
19:12 • Ticket [2997087fff] Dangerous type casts to ClientData status still Open wit... artifact: 17c95b5079 user: jan.nijtmans
19:09 • Ticket [2997087fff]: 1 change artifact: 81da934503 user: jan.nijtmans
2010-05-05
18:54 • Ticket [2997087fff]: 4 changes artifact: 4062fe4f12 user: nijtmans
18:54 • Add attachment typecast.patch to ticket [2997087fff] artifact: 0107d81e32 user: nijtmans
11:52 • New ticket [2997087fff] Dangerous type casts to ClientData. artifact: 393866f0a1 user: nijtmans

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: