Originally Posted by Aztec
I dont totally agree on the issues. I am not challenging the issue but out of interest I would like to know.
If the return of malloc is cast then the error which would be flagged is hidden, resulting in a difficult to find bug.
Still not sure of what bug its talking about.
Also, during maintenance, if the type of the pointer changes but the cast is not changed, once again there is a difficult to find bug.
If I maintain the consistency of type casting everytime this should never come in the scenario.