Two Sets of Eyes, Carl R. Dichter Unix Review, Vol 10, No. 1, Jan 1992. Nice article recommending the use of visual inspection of code. He estimates an hour for inspecting 1000 lines of code. C Code Inspection Checklist (for Motorola's ASIC division) Code Description *INIT Are all variables initialized before use? *RETRN Do all non-void functions have a return value? *DECL Are all non-integer functions pre-declared? Do libraries have sufficient declarations (external functions, types and other interfaces) in a header file? *ARGS Are functions called with the correct number and type of parameters? STORE Is storage properly allocated for variables and string manipulation? LOGIC Are there any common logical errors (== vs =, misplaced semi-colons, missing braces)? SUBSC Are all array subscripts within bounds? BNDS Are there any off-by-one (fencepost) errors in indexing and subscripting operations? UNIQ Are all globals named with a unique prefix? STAT Do all program exits have correct status values? HEAD Are all global functions correctly documented in a function header? @SCCS Is the SCCS style version string embedded in the module? +PORT Is port.h included? +SYS5 Are the System 5 compiler and libraries used (except on code that binds with non-System 5 third-party modules) SYSER Are failures from memory allocation and file I/O operations (malloc, calloc, realloc, fclose, fopen, open, fwrite, fread, fgets, ...) properly detected and handled? STD Are standard libraries used to interface to standard data stores (command line processor, technology file reader, EDIFREAD) EMBED Are any filenames or pathnames embedded? * These items are sufficiently checked by lint. Errors from lint may not indicate non-compliance; each error from lint must be investigated to determine whether there is an actual error. If an actual error is found, it should be listed here. @ RCS $Id$ string instead? Do *NOT* use $Log$. - moraes + Motorola specific - moraes