Skip to main content

IAR Embedded Workbench for RX 5.20

MISRAC2012-Rule-21.21

In this section:
Synopsis

(Required) The Standard Library function system of <stdlib.h> shall not be used.

Enabled by default

Yes

Severity/Certainty

Low/Medium

lowmedium.png
Full description

Uses of system were found.

Coding standards
MISRA C:2012 Rule-21.21

(Required) The Standard Library function system of <stdlib.h> shall not be used

Code examples

The following code example fails the check and will give a warning:

#include <stdlib.h>
int example(void) {
    return system("ls -l");
}

The following code example passes the check and will not give a warning about this issue:

int example(void) {
    return 0;
}