| JPL |
C/C++ Warning Classes |
| JPL:1 Do not stray outside the language definition. |
|
| JPL:2 Compile with all warnings enabled; use static source code analyzers. |
|
| JPL:3 Use verifiable loop bounds for all loops meant to be terminating. |
|
| JPL:4 Do not use direct or indirect recursion. |
|
| JPL:5 Do not use dynamic memory allocation after task initialization. |
|
| JPL:7 Do not use task delays for task synchronization. |
|
| JPL:9 Place restrictions on the use of semaphores and locks. |
|
| JPL:11 Do not use goto, setjmp or longjmp. |
|
| JPL:12 Do not use selective value assignments to elements of an enum list. |
|
| JPL:13 Declare data objects at smallest possible level of scope. |
|
| JPL:14 Check the return value of non-void functions, or explicitly cast to (void). |
|
| JPL:15 Check the validity of values passed to functions. |
|
| JPL:16 Use static and dynamic assertions as sanity checks. |
|
| JPL:17 Use U32, I16, etc instead of predefined C data types such as int, short, etc. |
|
| JPL:18 Make the order of evaluation in compound expressions explicit. |
|
| JPL:19 Do not use expressions with side effects. |
| closely mapped |
|
| also related |
|
|
| JPL:20 Make only very limited use of the C pre-processor. |
|
| JPL:21 Do not define macros within a function or a block. |
|
| JPL:22 Do not undefine or redefine macros. |
|
| JPL:23 Place #else, #elif, and #endif in the same file as the matching #if or #ifdef. |
|
| JPL:24 Place no more than one statement or declaration per line of text. |
|
| JPL:25 Use short functions with a limited number of parameters. |
|
| JPL:26 Use no more than two levels of indirection per declaration. |
|
| JPL:27 Use no more than two levels of dereferencing per object reference. |
|
| JPL:28 Do not hide dereference operations inside macros or typedefs. |
|
| JPL:30 Do not cast function pointers into other types. |
|
| JPL:31 Do not place code or declarations before an #include directive. |
|