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

Guideline:  7.5#3Checked automatically with code checker

Synopsis:Avoid explicit casting where possible.
Language:C
Severity Level:7
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.