Tcl Source Code

View Ticket
Login
Ticket UUID: 2997087
Title: Dangerous type casts to ClientData
Type: Patch Version: None
Submitter: jan.nijtmans Created on: 2010-05-05 11:52:42
Subsystem: 52. Portability Support Assigned To: jan.nijtmans
Priority: 5 Medium Severity:
Status: Open Last Modified: 2014-02-21 19:12:40
Resolution: None Closed By:
    Closed on:
Description:
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.
User Comments: nijtmans added on 2010-05-05 18:54:20:

File Added - 372922: typecast.patch

Attachments: