The Linux kernel sparse compiler is used to check millions lines of C source i
n the Linux kernel but it can be used on any other C source as well and also on gml4gtk C source.

Here is my spare tool to generate graph data from C sources at

https://github.com/gml4gtk/sparsegv

Because it is so small it is easy to add more functionality and code metrics or source checking

The sparse tool is written in difficult C and advanced of very high quality
and outside Linux kernel barely used then no sites have more information
about it or other uses of this great software tool but here is something.

There are for exapmple from dobbs free boosk about C data structures
and algorithms available from amazon or free online at
http://mindfulintegrations.com/books/Technology/computer_science/algo/start.htm

The documentation of sparse at here at https://sparse.docs.kernel.org/en/latest/
And sparse is much updated then using the newest version is needed.

The technical info about sparse internals is on the mailling list because all patches are
documented and explained in the mails. That is a very nice feature of sparse.

The sparse repo has a program to generate dot graph data with the compiler building blocks
https://git.kernel.org/pub/scm/devel/sparse/sparse.git/tree/graph.c

But it is using html labels and gml4gtk is updated for such graph data.

This is how the building blocks look with my own changed version of sparse:

sparse

The building blocks can have more info added and my version of it is in this C source:


#include "globals.h"

static FILE *f = NULL;

static void sparse_output_bb(struct basic_block *bb, const char *fname, const char *sname)
{
    struct instruction *insn = NULL;
    const char *is = NULL;
    int c = 0;
    const char *p = NULL;
    char *q = NULL;
    char *buf = NULL;
    int cl = 0;
    fprintf(f, "%s() line %d file %s\\lbasic block number %d\\l%s\\l", fname, bb->pos.line, sname, bb->nr, show_label(bb));

    FOR_EACH_PTR(bb->insns, insn) {
        if (!insn->bb) {
            continue;
        }
        is = show_instruction(insn);
        /* the instruction can have "" to set as escape */
        if (strchr(is, '"')) {
            /* how many " in s */
            c = 0;
            p = is;
            while (*p) {
                if ((*p) == '"') {
                    c++;
                }
                p++;
            }
            /* how many space for new string */
            cl = strlen(is) + 1 + (2 * c);
            buf = calloc(1, cl);
            p = is;
            q = buf;
            /* change " into \" */
            /* change \ into \\ */
            while (*p) {
                if ((*p) == '"') {
                    *q = '\\';
                    q++;
                    *q = '"';
                } else if ((*p) == '\\') {
                    *q = '\\';
                    q++;
                    *q = '\\';
                } else {
                    *q = *p;
                }
                q++;
                p++;
            }
            is = buf;
        } else {
            /* no changes needed */
        }
        fprintf(f, "  %s\\l", is);
        if (buf) {
            free(buf);
            buf = NULL;
        }
    }
    END_FOR_EACH_PTR(insn);

    return;
}

/* Draw the subgraph for a given entrypoint. Includes details of loads
 * and stores for globals, and marks return bbs */
static void graph_ep(struct entrypoint *ep)
{
    struct basic_block *bb;
    struct instruction *insn;
    const char *fname, *sname;

    fname = show_ident(ep->name->ident);
    sname = stream_name(ep->entry->bb->pos.stream);

    fprintf(f, "subgraph cluster%p {\n"
        "    color=blue;\n"
        "    label=\"%s\\l%s()\\l"
        "    file=%s;\\l" "    fun=%s;\\l" "    ep=bb%p;\\l\"\n", ep, sname, fname, sname, fname, ep->entry->bb);

    FOR_EACH_PTR(ep->bbs, bb) {
        struct basic_block *child;
        int ret = 0;
        const char *s = ", ls=\"[";

        /* Node for the bb */
        fprintf(f, "    bb%p [shape=ellipse,label=\"", bb);

        sparse_output_bb(bb, fname, sname);

        fprintf(f, "\",line=%d,col=%d", bb->pos.line, bb->pos.pos);

        /* List loads and stores */
        FOR_EACH_PTR(bb->insns, insn) {
            if (!insn->bb)
                continue;
            switch (insn->opcode) {
            case OP_STORE:
                if (insn->src->type == PSEUDO_SYM) {
                    fprintf(f, "%s store(%s)", s, show_ident(insn->src->sym->ident));
                    s = ",";
                }
                break;

            case OP_LOAD:
                if (insn->src->type == PSEUDO_SYM) {
                    fprintf(f, "%s load(%s)", s, show_ident(insn->src->sym->ident));
                    s = ",";
                }
                break;

            case OP_RET:
                ret = 1;
                break;

            }
        }
        END_FOR_EACH_PTR(insn);
        if (s[1] == 0)
            fprintf(f, "]\"");
        if (ret)
            fprintf(f, ",op=ret");
        fprintf(f, "];\n");

        /* Edges between bbs; lower weight for upward edges */
        FOR_EACH_PTR(bb->children, child) {
            fprintf(f, "    bb%p -> bb%p [op=br, %s];\n", bb, child,
                (bb->pos.line > child->pos.line) ? "weight=5" : "weight=10");
        }
        END_FOR_EACH_PTR(child);
    }
    END_FOR_EACH_PTR(bb);

    fprintf(f, "}\n");
}

/* Insert edges for intra- or inter-file calls, depending on the value
 * of internal. Bold edges are used for calls with destinations;
 * dashed for calls to external functions */
static void graph_calls(struct entrypoint *ep, int internal)
{
    struct basic_block *bb;
    struct instruction *insn;

    show_ident(ep->name->ident);
    stream_name(ep->entry->bb->pos.stream);

    FOR_EACH_PTR(ep->bbs, bb) {
        if (!bb)
            continue;
        if (!bb->parents && !bb->children && !bb->insns && verbose < 2)
            continue;

        FOR_EACH_PTR(bb->insns, insn) {
            if (!insn->bb)
                continue;
            if (insn->opcode == OP_CALL && internal == !(insn->func->sym->ctype.modifiers & MOD_EXTERN)) {

                /* Find the symbol for the callee's definition */
                struct symbol *sym;
                if (insn->func->type == PSEUDO_SYM) {
                    for (sym = insn->func->sym->ident->symbols; sym; sym = sym->next_id) {
                        if (sym->namespace & NS_SYMBOL && sym->ep)
                            break;
                    }

                    if (sym)
                        fprintf(f, "bb%p -> bb%p"
                            "[label=\"line\\l%d\",line=%d,col=%d,op=call,style=bold,weight=30];\n",
                            bb, sym->ep->entry->bb, insn->pos.line, insn->pos.line, insn->pos.pos);
                    else
                        fprintf(f, "bb%p -> \"%s\" "
                            "[label=\"line\\l%d\",line=%d,col=%d,op=extern,style=dashed];\n",
                            bb, show_pseudo(insn->func), insn->pos.line, insn->pos.line, insn->pos.pos);
                }
            }
        }
        END_FOR_EACH_PTR(insn);
    }
    END_FOR_EACH_PTR(bb);
}

void graph(void)
{
    struct symbol *sym = NULL;

    f = fopen("output.gv", "w");
    if (!f) {
        return;
    }
    fprintf(f, "/* generated with sparsegen */\ndigraph sparsegen {\n");
    FOR_EACH_PTR(all_syms, sym) {
        expand_symbol(sym);
        if (0) {
            /* this has already be done */
            linearize_symbol(sym);
        }
    }
    END_FOR_EACH_PTR(sym);

    FOR_EACH_PTR(all_syms, sym) {
        if (sym->ep) {
            graph_ep(sym->ep);
            graph_calls(sym->ep, 1);
        }
    }
    END_FOR_EACH_PTR(sym);

    /* Graph inter-file calls */
    FOR_EACH_PTR(all_syms, sym) {
        if (sym->ep)
            graph_calls(sym->ep, 0);
    }
    END_FOR_EACH_PTR(sym);

    fprintf(f, "}\n");
    fclose(f);
    return;
}

Also the smatch source code checker using sparse is used and is at http://smatch.sourceforge.net/

And it is easy to use on Linux like this:
make CHECK="~/path/to/smatch/smatch --full-path" CC=~/path/to/smatch/cgcc 
the cwerg is a python written compiler backend generating multiple formats at https://github.com/robertmuth/Cwerg


The tinycc compiler is GNU GPL Free and includes assembler and linker
to generate Linux or windows binaries and has windows api headers an windows versions at
With libtcc, you can use TCC as a backend for dynamic code generation
https://savannah.nongnu.org/projects/tinycc

Another way of backend for sparse is the be program and example is here in

cproc is a c11 compiler using qbe as a backend. It is released under the isc license.

https://github.com/michaelforney/cproc

A complete gui for oberon in C++ and qt5 cn interface to sparse at oberon https://github.com/rochus-keller/Oberon

The sparse tool is complex and difficult to use and understand to handle all kind of C issues.

Here is more about strange C issues at https://blog.robertelder.org/weird-c-syntax/

Also a c compiler and ll1 grammar at https://recc.robertelder.org/

on github at https://github.com/RobertElderSoftware/recc

There is a complete courcse about a c compiler with docs on all topics at
https://github.com/DoctorWkt/acwj

The idea of the clue compiler with own register allocator ir to translate the
sparse instructions in the building blocks into another language and that seems
not to be possible completely see:
http://cowlark.com/clue/

Maybe can find a solution to this idea at some day.
One solution is to get the oldestemscriptem compiler running again
that is writter in javascript and generates the needed javascript
which does do it correctly

The graalvm software can run llvm bytecode and maybe sparse can generate that.

There are smaller easier to understand llvm backends maybe usable with sparese at
https://github.com/rickBuczynski/coolang/blob/master/codegen/src/codegen.cpp
https://llvm.org/docs/tutorial/
https://github.com/sinistersnare/SinScheme/

Do no do malloc(0) because it depends on c lib what the result is from code below

char *ptr;

if ((ptr = (char *)malloc(0)) == NULL) {
puts(“Got a null pointer”);

}

else {
puts(“Got a valid pointer”);

}



The sparse or smatch software can be extended with a -xpedantic option
to be pedantic about issues being checked for in mission critical software.
That kind of software is not free available then a reason to try patching sparse.
This is a list of issues to check for derived from free available information

Some source code rules to keep eye on when programming and testing
Most are closed-source non-free products but for example psv-studio can be used free for this.
Few of these tools can be used at low-costs for not much money to pay for a license.

rosecheckers has unmaintained software on sourceforge but last commit is from year 2021.
which should check for cert standards and that has it own
site with text or xml file available for download. It also generates dot graph data!
This tool is called rosebud and available at rosecheckers on sourceforge

This info can also be used with the Linux kernel sparse checker software

Rule 1.1    MISRA-C2012-1.1    The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation’s translation limits.
Rule 1.2     MISRA-C2012-1.2    Language extensions should not be used
Rule 1.3     MISRA-C2012-1.3    There shall be no occurrence of undefined or critical unspecified behaviour
Rule 2.1     MISRA-C2012-2.1    A project shall not contain unreachable code
Rule 2.2     MISRA-C2012-2.2    There shall be no dead code
Rule 2.3    MISRA-C2012-2.3    A project should not contain unused type declarations
Rule 2.4     MISRA-C2012-2.4    A project should not contain unused tag declarations
Rule 2.5    MISRA-C2012-2.5    A project should not contain unused macro declarations
Rule 2.6     MISRA-C2012-2.6    A function should not contain unused label declarations
Rule 2.7     MISRA-C2012-2.7    There should be no unused parameters in functions
Rule 3.1     MISRA-C2012-3.1    The character sequences /* an // shall not be used within a comment
Rule 3.2    MISRA-C2012-3.2    If the source line containing a // comment ends with a \ character in the source character set, the next line becomes part of the comment. This may result in unintentional removal of code.
Rule 4.1     MISRA-C2012-4.1    Octal and hexadecimal escape sequences shall be terminated
Rule 4.2    MISRA-C2012-4.2    Trigraphs should not be used
Rule 5.1     MISRA-C2012-5.1    External identifiers shall be distinct
Rule 5.2    MISRA-C2012-5.2    Identifiers declared in the same scope and name space shall be distinct
Rule 5.3    MISRA-C2012-5.3    An identifier declared in an inner scope shall not hide an identifier declared in an outer scope
Rule 5.4     MISRA-C2012-5.4    Macro identifiers shall be distinct
Rule 5.5     MISRA-C2012-5.5    Identifiers shall be distinct from macro names
Rule 5.6    MISRA-C2012-5.6    A typedef name shall be a unique identifier
Rule 5.7     MISRA-C2012-5.7    A tag name shall be a unique identifier
Rule 5.8    MISRA-C2012-5.8    Identifiers that define objects or functions with external linkage shall be unique
Rule 5.9     MISRA-C2012-5.9    Identifiers that define objects or functions with internal linkage should be unique
Rule 6.1    MISRA_C2012-6.1    Bit-fields shall only be declared with an appropriate type
Rule 6.2    MISRA-C2012-6.2    Single-bit named bit fields shall not be of a signed type
Rule 7.1     MISRA-C2012-7.1    Octal constants shall not be used
Rule 7.2    MISRA_C2012-7.2    A “u” or “U” suffix shall be applied to all integer constants that are represented in an unsigned type
Rule 7.3     MISRA-C2012-7.3    The lowercase character “l” shall not be used in a literal suffix
Rule 7.4    MISRA-C2012-7.4    A string literal shall not be assigned to an object unless the object's type is pointer to const-qualified char
Rule 8.1    MISRA-C2012-8.1    Types shall be explicitly specified
Rule 8.2    MISRA-C2012-8.2    Function types shall be in prototype form with named parameters
Rule 8.3     MISRA-C2012-8.3    All declarations of an object or function shall use the same names and type qualifiers
Rule 8.4    MISRA-C2012-8.4    A compatible declaration shall be visible when an object or function with external linkage is defined
Rule 8.5    MISRA-C2012-8.5    An external object or function shall be declared once in one and only one file
Rule 8.6    MISRA-C2012-8.6    An identifier with external linkage shall have exactly one external definition
Rule 8.7    MISRA-C2012-8.7    Functions and objects should not be defined with external linkage if they are referenced in only one translation unit
Rule 8.8    MISRA-C2012-8.8    The static storage class specifier shall be used in all declarations of objects and functions that have internal linkage
Rule 8.9    MISRA-C2012-8.9    An object should be defined at block scope if its identifier only appears in a single function
Rule 8.10    MISRA-C2012-8.10    An inline function shall be declared with the static storage class
Rule 8.11     MISRA-C2012-8.11    When an array with external linkage is declared, its size should be explicitly specified
Rule 8.12     MISRA-C2012-8.12    Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique
Rule 8.13    MISRA-C2012-8.13    A pointer should point to a const-qualified type whenever possible
Rule 8.14     MiSRA-C2012-8.14    The restrict type qualifi er shall not be used
Rule 9.1     MISRA-C2012-9.1    The value of an object with automatic storage duration shall not be read before it has been set
Rule 9.2    MISRA-C2012-9.2    The initializer for an aggregate or union shall be enclosed in braces
Rule 9.3    MISRA-C2012-9.3    Arrays shall not be partially initialized
Rule 9.4    MISRA-C2012-9.4    An element of an object shall not be in itialized more than once
Rule 9.5     MISRA-C2012-9.5    Where designated initializers are used t o initialize an array object the size of the array shall be specified explicitly
Rule 10.1     MISRA-C2012-10.1    Operands shall not be of an inappropriate essential type
Rule 10.2     MISRA-C2012-10.2    Expressions of essentially character type shall not be used inappropriately in addition and subtraction operations
Rule 10.3     MISRA-C2012-10.3    The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category
Rule 10.4     MISRA-C2012-10.4    Both operands of an operator in which the usual arithmetic conversions are performed s hall have the same essential type category
Rule 10.5     MISRA_C2012-10.5    The value of an expression should not be cast to an inappropriate essential type
Rule 10.6     MISRA-C2012-10.6    The value of a composite expression shall not be assigned to an object with wider essential type
Rule 10.7     MISRA-C2012-10.7    If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential type
Rule 10.8     MISRA-C2012-10.8    The value of a composite expression shall not be cast to a different essential type category or a wider essential type
Rule 11.1     MISRA-C2012-11.1    Conversions shall not be performed between a pointer to a function and any other type
Rule 11.2    MISRA-C2012-11.2    Conversions shall not be performed between a pointer to an incomplete type and any other type
Rule 11.3     MISRA-C2012-11.3    A cast shall not be performed between a pointer to object type and a pointer to a diff erent object type
Rule 11.4     MISRA-C2012-11.4    A conversion should not be performed between a pointer to object and an integer type
Rule 11.5     MISRA-C2012-11.5    A conversion should not be performed from pointer to void into pointer to object
Rule 11.6     MISRA-C2012-11.6    A cast shall not be performed between pointer to void and an arithmetic type
Rule 11.7     MISRA-C2012-11.7    A cast shall not be performed between pointer to object and a noninteger arithmetic type
Rule 11.8     MISRA-C2012-11.8    A cast shall not remove any const or volatile qualification from the type pointed to by a pointer
Rule 11.9     MISRA-C2012-11.9    The macro NULL shall be the only per mitted form of integer null pointer constant
Rule 12.1     MiSRA-C2012-12.1    The precedence of operators within expressions should be made explicit
Rule 12.2     MISRA-C2012-12.2    The right hand operand of a shift operator shall lie in the range zero to one less than the width in bits of the essential type of the left hand operand
Rule 12.3     MISRA-C2012-12.3    The comma operator should not be used
Rule 12.4     MISRA-C2012-12.4    Evaluation of constant expressions should not lead to unsigned integer wrap-around
Rule 13.1     MISRA-C2012-13.1    Initializer lists shall not contain persistent side eff ects
Rule 13.2     MISRA-C2012-13.2    The value of an expression and its persistent side eff ects shall be the same under all permitted evaluation orders
Rule 13.3     MISRA-C2012-13.3    A full expression containing an increment (++) or decrement (--) operator should hav e no other potential side eff ects other than that caused by the increment or decrement operator
Rule 13.4     MISRA-C2012-13.4    The result of an assignment operator should not be used
Rule 13.5     MISRA-C2012-13.5    The right hand operand of a logical && or || operator shall not contain persistent side effects
Rule 13.6     MISRA-C2012-13.6    The operand of the sizeof operator shall not contain any expression which has potential side effects
Rule 14.1     MISRA-C2012-14.1    A loop counter shall not have essentially fl oating type
Rule 14.2     MISRA-C2012-14.2    A for loop shall be well-formed
Rule 14.3    MISRA-C2012-14.3    Controlling expressions shall not be invariant
Rule 14.4     MISRA-C2012-14.4    The controlling expression of an if statement and the controlling expression of an iteration- statement shall have essentially Boolean type
Rule 15.1     MISRA-C2012-15.1    The goto statement should not be used
Rule 15.2     MISRA-C2012-15.2    The goto statement shall jump to a label declared later in the same function
Rule 15.3     MISRA-C2012-15.3    Any label referenced by a goto statement shall be declared in the same block, or in any block enclosing the goto statement
Rule 15.4     MISRA-C2012-15.4    There should be no more than one break or goto statement used to terminate any iteration statement
Rule 15.5     MISRA-C2012-15.5    A function should have a single point of exit at the end
Rule 15.6     MISRA-C2012-15.6    The body of an iteration-statement or a selection-statement shall be a compound-statement
Rule 15.7     MISRA-C2012-15.7    All if … else if constructs shall be terminated with an else statement
Rule 16.1    MISRA-C2012-16.1    All switch statements shall be well-formed
Rule 16.2     MISRA-C2012-16.2    A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement
Rule 16.3     MISRA-C2012-16.3    An unconditional break statement shall terminate every switch-clause
Rule 16.4     MISRA-C2012-16.4    Every switch statement shall have a default label
Rule 16.5     MISRA-C2012-16.5    A default label shall appear as either the first or the last switch label of a switch statement
Rule 16.6     MISRA-C2012-16.6    Every switch statement shall have at least two switch-clauses
Rule 16.7     MISRA-C2012-16.7    A switch-expression shall not have essentially Boolean type
Rule 17.1     MISRA-C2012-17.1    The features of shall not be used
Rule 17.2    MISRA-C2012-17.2    Functions shall not call themselves, either directly or indirectly
Rule 17.3    MISRA-C2012-17.3    A function shall not be declared implicitly
Rule 17.4    MISRA-C2012-17.4    All exit paths from a function with non-void return type shall have an explicit return statement with an expression
Rule 17.5     MISRA-C2012-17.5    The function argument corresponding to a parameter declared to have an array type shall have an appropriate number of elements
Rule 17.6     MISRA-C2012-17.6    The declaration of an array parameter shall not contain the static keyword between the [ ]
Rule 17.7    MISRA-C2012-17.7    The value returned by a function having non-void return type shall be used
Rule 17.8     MISRA-C2012-17.8    A function parameter should not be modifi ed
Rule 18.1     MISRA-C2012-18.1    A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand
Rule 18.3    MISRA-C2012-18.3    The relational operators >, >=, < and <= shall not be applied to objects of pointer type except where they point into the same object
Rule 18.4    MISRA-C2012-18.4    The +, -, += and -= operators should not be applied to an expression of pointer type
Rule 18.5     MISRA-C2012-18.5    Declarations should contain no more than two levels of pointer nesting
Rule 18.6     MISRA-C2012-18.6    The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist
Rule 18.7    MISRA-C2012-18.7    Flexible array members shall not be declared
Rule 18.8     MISRA-C2012-18.8    Variable-length array types shall not be used
Rule 19.2     MiSRA-C2012-19.2    The union keyword should not be used
Rule 20.1     MISRA-C2012-20.1    #include directives should only be preceded by preprocessor directives or comments
Rule 20.2     MISRA-C2012-20.2    The ', " or \ characters and the /* or // character sequences shall not occur in a header file name
Rule 20.3     MISRA-C2012-20.3    The #include directive shall be followed by either a or "filename" sequence
Rule 20.4     MISRA-C2012-20.4    A macro shall not be defined with the same name as a keyword
Rule 20.5     MISRA-C2012-20.5    #undef should not be used
Rule 20.6     MISRA-C2012-20.6    Tokens that look like a preprocessing directive shall not occur within a macro argument
Rule 20.7    MISRA-C2012-20.7    Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses
Rule 20.8     MISRA-C2012-20.8    The controlling expression of a #if or #elif preprocessing directive shall evaluate to 0 or 1
Rule 20.9     MISRA-C2012-20.9    All identifiers used in the controlling expression of #if or #elif preprocessing directives shall be #defi ne’d before evaluation
Rule 20.10     MISRA-C2012-21.10    The # and ## preprocessor operators should not be used
Rule 20.11     Misra-c2012-21.11    A macro parameter immediately following a # operator shall not immediately be followed by a ## operator
Rule 20.12     MISRA-C2012-21.12    A macro parameter used as an operand to the # or ## o perators, which is itself subj ect to further macro replacement, shall only be used as an operand to these operators
Rule 20.13     MISRA-C2012-20.13    A line whose first token is # shall be a valid preprocessing directive
Rule 20.14    MISRA-C2012-20.14    All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #ifdef or #ifndef directive to which they are related
Rule 21.1     MISRA-C2012-21.1    #defi ne and #undef shall not be used on a reserved identifier or reserved macro name
Rule 21.2    MISRA-C2012-21.2    A reserved identifier or macro name shall not be declared
Rule 21.3     MISRA-C2012-21.3    The memory allocation and deallocation functions of shall not be used
Rule 21.4     MISRA-C2012-21.4    The standard header file shall not be used
Rule 21.5     MISRA-C2012-21.5    The standard header file shall not be used
Rule 21.6    MISRA-C2012-21.6    The Standard Library input/output functions shall not be used
Rule 21.7     MISRA-C2012-21.7    The atof, atoi, atol and atoll functions of shall not be used
Rule 21.8     MISRA-C2012-21.8    The library functions abort, exit, getenv and system of shall not be used
Rule 21.9     MISRA-C2012-21.9    The library functions bsearch and qsort of shall not be used
Rule 21.10    MISRA-C2012-21.10    The Standard Library time and date functions shall not be used
Rule 21.11     MISRA-C2012-21.11    The standard header file shall not be used
Rule 21.12    MISRA-C2012-21.12    The exception handling features of should not be used
Rule 22.1     MISRA-C2012-22.1    All resources obtained dynamically by means of Standard Library functions shall be explicitly released
Rule 22.2     MISRA-C2012-22.2    A block of memory shall only be freed if it was allocated by means of a Standard Library function
Rule 22.4     MISRA-C2012-22.4    There shall be no attempt to write to a stream which has been opened as read-only
Rule 22.5    MISRA-C2012-22.5    A pointer to a FILE object shall not be dereferenced
Rule 22.6     MISRA-C2012-22.6    The value of a pointer to a FILE shall not be used after the associated stream has been closed
1    CWE-910 : The software uses or accesses a file descriptor after it has been closed.
2    CWE-415: The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.
3    CWE-404: The program does not release or incorrectly releases a resource before it is made available for re-use.
4    CWE-401: The software does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory.
5    CWE-369: The product divides a value by zero.
6    CWE-252: The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
7    CWE-783: The program uses an expression in which operator precedence causes incorrect logic to be used.
8    CWE-561: The software contains dead code, which can never be executed.
9    CWE-484 : The program omits a break statement within a switch or similar construct, causing code associated with multiple conditions to execute. This can cause problems when the programmer only intended to execute code associated with one condition.
10    CWE-478: The code does not have a default case in a switch statement, which might lead to complex logical errors and resultant weaknesses.
11    CWE-338: The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
12    CWE-121: Stack-based Buffer Overflow
13    CWE-122: Heap-based Buffer Overflow
14    CWE-124: Buffer Underwrite ('Buffer Underflow')
15    CWE-126: Buffer Over-read
16    CWE-127: Buffer Under-read
17    CWE-197: Numeric Truncation Error
18    CWE-242: Use of Inherently Dangerous Function
19    CWE-398: Indicator of Poor Code Quality
20    CWE-401: Improper Release of Memory Before Removing Last Reference ('Memory Leak')
21    CWE-416: Use After Free
22    CWE-457: Use of Uninitialized Variable
23    CWE-476: NULL Pointer Dereference
24    CWE-483: Incorrect Block Delimitation
25    CWE-562: Return of Stack Variable Address
26    CWE-563: Assignment to Variable without Use ('Unused Variable')
27    CWE-570: Expression is Always False
28    CWE-571: Expression is Always True
29    CWE-674: Uncontrolled Recursion
30    CWE-758: Reliance on Undefined, Unspecified, or Implementation-Defined Behavior
31    CWE-762: Mismatched Memory Management Routines
32    CWE-704: Incorrect Type Conversion or Cast
33    CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
34    CWE-15: External Control of System or Configuration Setting
35    CWE-908: Use of Uninitialized Resource
36    CWE-911: Improper Update of Reference Count
37    CWE-772: Missing Release of Resource after Effective Lifetime
38    CWE-833: Improper Locking
39    CWE-413: Improper Resource Locking
40    CWE-335: Incorrect Usage of Seeds in Pseudo-Random Number Generator (PRNG)
41    CWE-468: Incorrect Pointer Scaling
42    CWE-825: Expired Pointer Dereference
43    CWE-466: Return of Pointer Value Outside of Expected Range
44    CWE-390: Detection of Error Condition Without Action
45    CWE-1069: Empty Exception Block
46    CWE-477: Use of Obsolete Function
47    CWE-676: Use of Potentially Dangerous Function
48    CWE-749: Exposed Dangerous Method or Function
49    CWE-547: Use of Hard-coded, Security-relevant Constants
50    CWE-628: Function Call with Incorrectly Specified Arguments
51    CWE-694: Use of Multiple Resources with Duplicate Identifier
52    CWE-1041: Use of Redundant Code
53    CWE-1045: Parent Class with a Virtual Destructor and a Child Class without a Virtual Destructor
54    CWE-1046: Creation of Immutable Text Using String Concatenation
55    CWE-1116: Inaccurate Comments
56    CWE-1077: Floating Point Comparison with Incorrect Operator
57    CWE-681: Incorrect Conversion between Numeric Types
58    CWE-1071: Empty Code Block
59    CWE-1126: Declaration of Variable with Unnecessarily Wide Scope
60    CWE-1113: Inappropriate Comment Style
61    CWE-1109: Use of Same Variable for Multiple Purposes
62    CWE-1108: Excessive Reliance on Global Variables
63    CWE-1102: Reliance on Machine-Dependent Data Representation
64    CWE-1098: Data Element containing Pointer Item without Proper Copy Control Element
65    CWE-1078: Inappropriate Source Code Style or Formatting
66    CWE-590: Free of Memory not on the Heap
67    CWE-664: Improper Control of a Resource Through its Lifetime
68    CWE-788: Access of Memory Location After End of Buffer
69    CWE-786: Access of Memory Location Before Start of Buffer
70    CWE-687: Function Call With Incorrectly Specified Argument Value
71    CWE-688: Function Call With Incorrect Variable or Reference as Argument
72    CWE-686: Function Call With Incorrect Argument Type
73    CWE-665: Improper Initialization
74    CWE-391: Unchecked Error Condition
75    CWE-703: Improper Check or Handling of Exceptional Conditions
76    CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
77    CWE-685: Function Call With Incorrect Number of Arguments
78    CWE-672: Operation on a Resource after Expiration or Release
79    CWE-771: Missing Reference to Active Allocated Resource
80    CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime
81    CWE-190: Integer Overflow or Wraparound
82    CWE-595: Comparison of Object References Instead of Object Contents
83    CWE-467: Use of sizeof() on a Pointer Type
84    CWE-682: Incorrect Calculation
85    CWE-587: Assignment of a Fixed Address to a Pointer
86    CWE-131: Incorrect Calculation of Buffer Size
87    CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
88    CWE-195: Signed to Unsigned Conversion Error
89    CWE-128: Wrap-around Error
90    CWE-597: Use of Wrong Operator in String Comparison
91    CWE-834: Excessive Iteration
92    CWE-768: Incorrect Short Circuit Evaluation
93    CWE-392: Missing Report of Error Condition
94    CWE-415: Double Free

This is the top of bugs in 2021 according to mitre


The list below provides insight to the community at large into the most critical and current software security weaknesses.
Rank     ID     Name     Score
[1]     CWE-787     Out-of-bounds Write     65.93
[2]     CWE-79     Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')     46.84
[3]     CWE-125     Out-of-bounds Read     24.9
[4]     CWE-20     Improper Input Validation     20.47
[5]     CWE-78     Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')     19.55
[6]     CWE-89     Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')     19.54
[7]     CWE-416     Use After Free     16.83
[8]     CWE-22     Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')     14.69
[9]     CWE-352     Cross-Site Request Forgery (CSRF)     14.46
[10]     CWE-434     Unrestricted Upload of File with Dangerous Type     8.45
[11]     CWE-306     Missing Authentication for Critical Function     7.93
[12]     CWE-190     Integer Overflow or Wraparound     7.12
[13]     CWE-502     Deserialization of Untrusted Data     6.71
[14]     CWE-287     Improper Authentication     6.58
[15]     CWE-476     NULL Pointer Dereference     6.54
[16]     CWE-798     Use of Hard-coded Credentials     6.27
[17]     CWE-119     Improper Restriction of Operations within the Bounds of a Memory Buffer     5.84
[18]     CWE-862     Missing Authorization     5.47
[19]     CWE-276     Incorrect Default Permissions     5.09
[20]     CWE-200     Exposure of Sensitive Information to an Unauthorized Actor     4.74
[21]     CWE-522     Insufficiently Protected Credentials     4.21
[22]     CWE-732     Incorrect Permission Assignment for Critical Resource     4.2
[23]     CWE-611     Improper Restriction of XML External Entity Reference     4.02
[24]     CWE-918     Server-Side Request Forgery (SSRF)     3.78
[25]     CWE-77     Improper Neutralization of Special Elements used in a Command ('Command Injection')     3.58


This are misra error messages

/* Kapitel 1 */
1,1,"All code shall conform to ISO 9899:1990 \"Programming languages - C \ E 2 \", amended and "
"corrected by ISO/IEC 9899/COR1:1995, ISO/IEC 9899/AMD1:1995, and ISO/IEC 9899/COR2:1996.",MISRA|MISRA_2004,

1,2,"No reliance shall be placed on undefined or unspecified behaviour.",MISRA|MISRA_2004,

1,3,"Multiple compilers and/or languages shall only be used if there is a common defined "
"interface standard for object code to which the languages/compilers/assembler conforms",MISRA|MISRA_2004,

1,4,"The compiler/linker shall be checked to ensure that 31 character significance and "
"case sensitivity are supported for external identifiers",MISRA|MISRA_2004,

1,5,"Floating point implementations should comply with a defined floating-point standard",MISRA|MISRA_2004,

/* Kapitel 2 */
2,1,"Assembly language shall be encapsulated and isolated",MISRA|MISRA_2004,

2,2,"Source code shall only use /* ... */ style comments",MISRA|MISRA_2004,

2,3,"The character sequence /* shall not be used within a comment",MISRA|MISRA_2004,

2,4,"Sections of code should not be \"commented out\"",MISRA|MISRA_2004,


/* Kapitel 3 */
3,1,"All usage of implementation-defined behaviour shall be documented ",MISRA|MISRA_2004,

3,2,"The character set and corresponding encoding shall be documented",MISRA|MISRA_2004,

3,3,"The implementation of integer division in the chosen compiler should "
"be determined, documented and taken into account",MISRA|MISRA_2004,

3,4,"All use of the #pragma directive shall be documented and explained",MISRA|MISRA_2004,

3,5,"If it is being relied upon, the implementation-defined behaviour and "
"packing of bitfields shall be documented",MISRA|MISRA_2004,

3,6,"All libraries used in production code shall be written to comply with "
"the provisions of this document, and shall have been subject to appropriate validation",MISRA|MISRA_2004,


/* Kapitel 4 */
4,1,"Only those escape sequences that are defined in the ISO C standard shall be used",MISRA|MISRA_2004|MISRA_PREPROC,

4,2,"Trigraphs shall not be used",MISRA|MISRA_2004,


/* Kapitel 5*/
5,1,"Identifiers (internal and external) shall not rely on the significance "
"of more than 31 characters",MISRA|MISRA_2004,

5,2,"Identifiers in an inner scope shall not use the same name as an identifier "
"in an outer scope, and therefor hide that identifier",MISRA|MISRA_2004,

5,3,"A typedef name shall be a unique identifier",MISRA|MISRA_2004,

5,4,"A tag name shall be a unique identifier",MISRA|MISRA_2004,

5,5,"No object or function identifier with static storage duration should be reused",MISRA|MISRA_2004,

5,6,"No identifier in one name space should have the same spelling as an identifier "
"in another name space, with the exception of structure and union member names",MISRA|MISRA_2004,

5,7,"No identifier name should be reused",MISRA|MISRA_2004,


/* Kapitel 6 */
6,1,"The plain char type shall be used only for the storage and use of character values",MISRA|MISRA_2004,

6,2,"signed and unsigned char type shall be used only for the storage and use of numeric values",MISRA|MISRA_2004,

6,3,"typedefs that indicate size and signedness should be used in place of the basic types",MISRA|MISRA_2004,

6,4,"Bit fields shall only be defined to be of type unsigned int or signed int",MISRA|MISRA_2004,

6,5,"Bit fields of type signed int shall be at least 2 bit long",MISRA|MISRA_2004,


/* Kapitel 7 */
7,1,"Octal constants (other than zero) and octal escape sequences shall not be used",MISRA|MISRA_2004,


/* Kapitel 8 */
8,1,"Functions shall have prototype declaration and the prototype shall "
"be visible at both the function definition and call",MISRA|MISRA_2004,

8,2,"Whenever an object or function is declared or defined, its type shall "
"be explicitly stated",MISRA|MISRA_2004,

8,3,"For each function parameter the type given in the declaration and "
"definition shall be identical, and the return type shall also be identical",MISRA|MISRA_2004,

8,4,"If objects or functions are declared more than once their type shall be compatible",MISRA|MISRA_2004,

8,5,"There shall be no definition of objects or functions in a header file",MISRA|MISRA_2004,

8,6,"Functions shall be declared at file scope",MISRA|MISRA_2004,

8,7,"Objects shall be defined at block scope if they are only accessed from "
"within a single function",MISRA|MISRA_2004,

8,8,"An external object or function shall be declared in one and only one file",MISRA|MISRA_2004,

8,9,"An identifier with external linkage shall have excactly one external definition",MISRA|MISRA_2004,

8,10,"All declarations and definitions of objects and functions at file scope shall "
"have internal linkage  unless external linkage is required",MISRA|MISRA_2004,

8,11,"The static storage class specifier shall be used in definitions and declarations "
"of objects and functions that have internal linkage",MISRA|MISRA_2004,

8,12,"When an array is declared with external linkage, its size shall be stated "
"or defined implicitly be initialisation",MISRA|MISRA_2004,


/* Kapitel 9 */
9,1,"All automatic variables shall have been assigned a value before being used",MISRA|MISRA_2004,

9,2,"Braces shall be used to indicate and match the structure in the non-zero "
"initialisation of arrays and structures",MISRA|MISRA_2004,

9,3,"In an enumerator list, the \"=\" construct shall not be used to explicitly "
"initialise members other than the first, unless all items are explicitly initialised",MISRA|MISRA_2004,


/* Kapitel 10 */
10,1,"The value of an expression of integer type shall not be implicitly converted to a different underlying type if: \n"
"  a) it is not a conversion to a wider integer type of the same signedness, or\n"
"  b) the expression is complex, or\n"
"  c) the expression is not constant and is a function argument, or\n"
"  d) the expression is not constant and is a return expression",MISRA|MISRA_2004,

10,2,"The value of an expression of floating type shall not be implicitly converted to a different type if:\n"
"  a) it is not a conversion to a wider floating type, or\n"
"  b) the expression is complex, or\n"
"  c) the expression is a function argument, or\n"
"  d) the expression is a return expression\n",MISRA|MISRA_2004,

10,3,"The value of a complex expression of integer type may only be cast "
"to a atype that is narrower and of the same signedness as the "
"underlying type of the expression",MISRA|MISRA_2004,

10,4,"The value of a complex expression of floating type may only be cast "
"to a narrower floating type",MISRA|MISRA_2004,

10,5,"If the bitwise operators ~ and << are applied to an operand of "
"underlying type unsigned char or unsigned short, the result "
"shall be immediately cast to the underlying type of the operand",MISRA|MISRA_2004,

10,6,"A \"U\" suffix shall be applied to all constants of unsigned type",MISRA|MISRA_2004,

/* Kapitel 11 */
11,1,"Conversions shall not be performed between a pointer to a function and any type "
"other than an integral type",MISRA|MISRA_2004,

11,2,"Conversions shall not be performed between a pointer to object and any type "
"other than an integral type, another pointer to object type or a pointer to void",MISRA|MISRA_2004,

11,3,"A cast should not be performed between a pointer type and an integral type",MISRA|MISRA_2004,

11,4,"A cast should not be performed between a pointer to object type and a "
"different pointer to object type.",MISRA|MISRA_2004,

11,5,"A cast shall not be performed that removes any const or volatile qualification "
"from the type addresses by a pointer",MISRA|MISRA_2004,


/* Kapitel 12 */
12,1,"Limited dependence should be placed on C's operator precedence rules in expressions",MISRA|MISRA_2004,

12,2,"The value of an expression shall be the same under any order of "
"evaluation that the standard permits",MISRA|MISRA_2004,

12,3,"The sizeof operator shall not be used on expressions that contain side effects",MISRA|MISRA_2004,

12,4,"The right-hand operand of a logical && or || operator shall not "
"contain side effects",MISRA|MISRA_2004,

12,5,"The operands of a logical && or || shall be primary-expressions",MISRA|MISRA_2004,

12,6,"The operands of logical operators (&&, || and !) should be effectively Boolean, "
"Expressions that are effectively Booleand should not be used as operands to "
"eperators other than(&&, || and !)",MISRA|MISRA_2004,

12,7,"Bitweise operators shall not be applied to operands whose underlying type is signed",MISRA|MISRA_2004,

12,8,"The right-hand operand of a shift operator shall lie between zero and one less "
"than the width in bits of ther underlying type of the left-hand operand.",MISRA|MISRA_2004,

12,9,"The unary minus operator shall not be applied to an expression whose underlying type is unsigned",MISRA|MISRA_2004,

12,10,"The comma operator shall not be used",MISRA|MISRA_2004,

12,11,"Evaluation of constant unsigned integer expressions should not lead to wrap-around",MISRA|MISRA_2004,

12,12,"The underlying bit representation of floating-point values shall not be used",MISRA|MISRA_2004,

12,13,"The increment (++) and decrement (--) operators should not be mixed with other "
"operators in an expression",MISRA|MISRA_2004,


/* Kapitel 13 */
13,1,"Assignment opetaors shall not be used in expressions that yield a Boolean value",MISRA|MISRA_2004,

13,2,"Tests of a value against zero should be made explicit, unless the operand is effectively Boolean",MISRA|MISRA_2004,

13,3,"Floating-point expressions shall not be tested for equality or inequality",MISRA|MISRA_2004,

13,4,"The controlling expression of a for statement shall not contain any objects of floating type.",MISRA|MISRA_2004,

13,5,"The three expressions of a for statement shall be concerned only with loop control",MISRA|MISRA_2004,

13,6,"Numeric variables being used within a for loop for iteration counting shall not be modified in the body of the loop",MISRA|MISRA_2004,

13,7,"Boolean operations whose results are invariant shall not be permitted",MISRA|MISRA_2004,


/* Kapitel 14 */
14,1,"There shall be no unreachable code",MISRA|MISRA_2004,

14,2,"All non-null statements shall either:\n"
"  a) have at least one side-effect however executed, or\n"
"  b) cause control flow to change",MISRA|MISRA_2004,

14,3,"Before preprocessing, a null statement shall only occur on a line by itself; it may be "
"followed by a comment provided that the first character following the null statement "
"is a white-space character.",MISRA|MISRA_2004,

14,4,"The goto statement shall not be used",MISRA|MISRA_2004,

14,5,"The continue statement shall not be used",MISRA|MISRA_2004,

14,6,"For any interation statement there shall be at most one braek statement used for loop termination",MISRA|MISRA_2004,

14,7,"A function shall have a single point of exit at the end of the function",MISRA|MISRA_2004,

14,8,"The statement forming the body of a switch, while, do ... while or for statement "
"shall be a compound statement",MISRA|MISRA_2004,

14,9,"An if (expression) construct shall be followed by a compound statement. The else "
"keyword shall be followed by either a compound statement, or another if statement",MISRA|MISRA_2004,

14,10,"All if ... else if constructs shall be terminated with an else clause",MISRA|MISRA_2004,


/* Kapitel 15 */
15,1,"A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement",MISRA|MISRA_2004,

15,2,"An unconditional break statement shall terminate every non-empty switch clause",MISRA|MISRA_2004,

15,3,"The final clause of a switch statement shall be the default clause",MISRA|MISRA_2004,

15,4,"A Switch expression shall not represent a value that is effectively Boolean",MISRA|MISRA_2004,

15,5,"Every switch statement shall have at least one case clause",MISRA|MISRA_2004,


/* Kapitel 16 */
16,1,"Functions shall not be defined with a variable number of arguments",MISRA|MISRA_2004,

16,2,"Functions shall not call themselves, either directly or indirectly",MISRA|MISRA_2004,

16,3,"Identifiers shall be given for all of the parameters in a function prototype declaration",MISRA|MISRA_2004,

16,4,"The identifiers used in the declaration and definition of a function shall be identical",MISRA|MISRA_2004,

16,5,"Functions with no parameters shall be declared with parameter type void",MISRA|MISRA_2004,

16,6,"The number of arguments passed to a function shall match the number of parameters",MISRA|MISRA_2004,

16,7,"A pointer parameter in a function prototype should be declared as pointer to  const "
"if the pointer is not used to modify the addressed object",MISRA|MISRA_2004,

16,8,"All exit paths from a function with non-void return type shall have an explicit "
"return statement with an expression",MISRA|MISRA_2004,

16,9,"A function identifier shall only be used with either a preceding &, or with a "
"parenthesised parameter list, which may be empty",MISRA|MISRA_2004,

16,10,"If a function returns error information, then that error information shall be tested",MISRA|MISRA_2004,


/* Kapitel 17 */
17,1,"Pointer arithmetic shall only be applied to pointers that address an array or array element",MISRA|MISRA_2004,

17,2,"Pointer subtraction shall only be apllied to pointers that address elements of the same array",MISRA|MISRA_2004,

17,3,">, >=, <, <= shall not be applied to pointer types except where they point to the same array",MISRA|MISRA_2004,

17,4,"Array indexing shall be the only allowed form of pointer arithmetic",MISRA|MISRA_2004,

17,5,"The declaration of objects should contain no more than 2 levels of pointer indirection",MISRA|MISRA_2004,

17,6,"The address of an object with automatic storage shall not be assigned to an other "
"object that may persist after the first object has ceased to exist",MISRA|MISRA_2004,


/* Kapitel 18 */
18,1,"All structure and union types shall be complete at the end of a translation unit",MISRA|MISRA_2004,

18,2,"An object shall not be assigned to an overlapping object",MISRA|MISRA_2004,

18,3,"An area of memory shall not be reused for unrelated purposes",MISRA|MISRA_2004,

18,4,"Unions shall not be used",MISRA|MISRA_2004,


/* Kapitel 19 */
19,1,"#include statements in a file should only be preceded by other preprocessor directives or comments",MISRA|MISRA_2004,

19,2,"Non-standard characters should not occur in header file names in #include directives",MISRA|MISRA_2004,

19,3,"The #include directive shall be followed by either a <filename> or \"filename\" sequence",MISRA|MISRA_2004,

19,4,"C macros shall only expand to a braced initialiser, a constant, a parenthesised "
"expression, a type qualifier, a storage class specifier, or a do-while-zero construct",MISRA|MISRA_2004,

19,5,"Macros shall not be #defined'd or #undef'd within a block",MISRA|MISRA_2004,

19,6,"#undef shall not be used",MISRA|MISRA_2004,

19,7,"A function should be used in preference to a function-like macro",MISRA|MISRA_2004,

19,8,"A function-like macro shall not be invoked without all of its arguments",MISRA|MISRA_2004,

19,9,"Arguments to a function-like macro shall not contain tokens that look like preprocessing directives",MISRA|MISRA_2004,

19,10,"In the definition of a function-like macro each instance of a parameter shall be enclosed "
"in parentheses unless it is used as the operand of # or ##",MISRA|MISRA_2004,

19,11,"All macro identifiers in preprocessor directives shall be defined before use, except "
"in #ifdef and #ifndef preprocessor directives and the defined() operator",MISRA|MISRA_2004,

19,12,"There shall be at most one occurrence of the # or ## preprocessor operators in a "
"single macro definition",MISRA|MISRA_2004,

19,13,"The # and ## preprocessor operators should not be used",MISRA|MISRA_2004,

19,14,"The defined preprocessor operator shall only be used in one of the two standard forms",MISRA|MISRA_2004,

19,15,"Precautions shall be taken in order to prevent the contents of a header file being included twice",MISRA|MISRA_2004,

19,16,"Preprocessing directives shall be syntactically meaningful even when excluded by the preprocessor",MISRA|MISRA_2004,

19,17,"All #else, #elif and #endif preprocessor directives shall reside in the same file as "
"the #if or #ifdef directive to which they are related",MISRA|MISRA_2004,


/* Kapitel 20 */
20,1,"Reserved  identifiers, macros and functions in the standard library, shall not "
"be defined, redefined or undefined",MISRA|MISRA_2004,

20,2,"The names of standard library macros, objects and functions shall not be reused",MISRA|MISRA_2004,

20,3,"The validity of values passed to library functions shall be checked",MISRA|MISRA_2004,

20,4,"Dynamic heap memory allocation shall not be used",MISRA|MISRA_2004,

20,5,"The error indicator errno shall not be used",MISRA|MISRA_2004,

20,6,"The macro offsetof, in library <stddef.h>, shall not be used",MISRA|MISRA_2004,

20,7,"The setjmp macro and the longjmp function shall not be used",MISRA|MISRA_2004,

20,8,"The signal handling facilities of <signal.h> shall not be used",MISRA|MISRA_2004,

20,9,"The input/output library <stdio.h> shall not be used in production code",MISRA|MISRA_2004,

20,10,"The library functions atof, atoi and atol from library <stdlib.h> shall not be used",MISRA|MISRA_2004,

20,11,"The library functions abort, exit, getenv and system from library <stdlib.h> shall not be used.",MISRA|MISRA_2004,

20,12,"The time handling functions of library <time.h> shall not be used",MISRA|MISRA_2004,


/* Kapitel 21 */
21,1,"Minimisation of run-time failures shall be ensured by the use of at least one of:\n"
"  a) static analysis tools/techniques\n"
"  b) dynamic analysis tools/techniques\n"
"  c) explicit coding of checks to handle run-time faults",MISRA|MISRA_2004,