Page 36 - The Art of Designing Embedded Systems
P. 36

Disciplined Development  23

                    Table 2- 1  Code Inspection Checklist

                     Project:
                     Author:
                     Function Name:
                     Date:



                      Number of errors   Error type

                      Major    Minor
                                       Code does not meet firmware standards
                                       Function size and complexity unreasonable
                                       Unclear expression of ideas in the code
                             I       I  Poor encapsulation
                             I       I  Function prototypes not correctly used
                            I          Data types do not match

                                       Uninitialized variables at start of function
                             I        I  Uninitialized variables going into loops

                                       Poor logic-won’t   function as needed
                                       Poor commenting
                                       Error condition not caught (e.g.. return codes from
                                         malloc(  I)?
                                       Switch statement without a default case (if only a subse
                                         of the possible conditions used)?
                                       Incorrect syntax-such  as proper use of =, =, &&, &, et(
                                       Non-reentrant code in dangerous places
                                       Slow code in an area where speed is important
                             I        I  Other

                                       Other
                         A Major bug is one that ifnot removed could result in a problem that
                    the customer will see. Minor bugs are those that include spelling errors,
                    non-compliance with the firmware standards, and poor workmanship that
                    does not lead to a major error.
   31   32   33   34   35   36   37   38   39   40   41