The old tricks for cleaning your C code of most of its unwanted ugliness:
- Run PC-Lint on the code.
- Run LCLint on the code.
CL /W4 /Za /Oxon the code (with your usal compiler, optimization finds many bugs not found without)
GCC -O3 -Wall -ansi -pedanticon the code.