| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0013449 | VTK | (No Category) | public | 2012-09-12 07:59 | 2012-09-28 08:56 | ||||
| Reporter | Pietro Cerutti | ||||||||
| Assigned To | David Gobbi | ||||||||
| Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0013449: Invalid pointer conversion in vtkTkRenderWidget.cxx | ||||||||
| Description | in vtkTkRenderWidget.cxx, a return from calloc (void *) is assigned to a (char *). | ||||||||
| Tags | No tags attached. | ||||||||
| Project | TBD | ||||||||
| Type | incorrect functionality | ||||||||
| Attached Files | |||||||||
| Relationships | ||||||
|
||||||
| Relationships |
| Notes | |
|
(0029178) David Gobbi (developer) 2012-09-12 08:21 |
This is a duplicate of bug report 13198, perhaps you can be more helpful than the person who reported this before. What version of Tcl/Tk are you using? All the documentation that I have read says that ckalloc() returns a "char *". And on every computer that I've ever built VTK on, ckalloc() returns a "char *". So why does it return a "void *" on your machine? |
|
(0029183) Pietro Cerutti (reporter) 2012-09-12 08:45 |
It's tcl8.6, # define ckalloc(x) \ ((VOID *) Tcl_Alloc((unsigned)(x)) while tcl8.5 had # define ckalloc(x) Tcl_Alloc(x) And in both cases: EXTERN char * Tcl_Alloc(unsigned int size); I wasn't careful enough in the first place.. we should probably place a few casts around, surrounded by #if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6 // cast here #else // no cast needed here #endif |
|
(0029185) David Gobbi (developer) 2012-09-12 09:05 |
I'll just add the cast with a comment to say why it is necessary. The cast will work with all versions of Tcl. |
|
(0029187) Pietro Cerutti (reporter) 2012-09-12 09:06 |
Makes sense to me. Thanks! |
|
(0029290) David Gobbi (developer) 2012-09-28 08:56 |
Fixed by commit 376579aa. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2012-09-12 07:59 | Pietro Cerutti | New Issue | |
| 2012-09-12 07:59 | Pietro Cerutti | File Added: patch-Rendering_vtkTkRenderWidget.cxx | |
| 2012-09-12 08:21 | David Gobbi | Note Added: 0029178 | |
| 2012-09-12 08:34 | David Gobbi | Relationship added | duplicate of 0013198 |
| 2012-09-12 08:45 | Pietro Cerutti | Note Added: 0029183 | |
| 2012-09-12 09:05 | David Gobbi | Note Added: 0029185 | |
| 2012-09-12 09:06 | Pietro Cerutti | Note Added: 0029187 | |
| 2012-09-28 08:51 | David Gobbi | Assigned To | => David Gobbi |
| 2012-09-28 08:51 | David Gobbi | Status | backlog => tabled |
| 2012-09-28 08:56 | David Gobbi | Note Added: 0029290 | |
| 2012-09-28 08:56 | David Gobbi | Status | tabled => closed |
| 2012-09-28 08:56 | David Gobbi | Resolution | open => fixed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |