TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

SR:  7.5#2Checked automatically with code checker

Synopsis:Explicit casting from and to any other type from void * is forbidden.
Language:C
Severity Level:4
Category:EXPRESSIONS


Description:
Casting to the same type is redundant and symptomatic of a poor understanding of the types in use. In Standard C, void * is guaranteed to be compatible with other pointer types so an explicit cast is unnecessary. This is commonly and mistakenly done with malloc() for example.