C and C++


BADMACRO.L_TMPNAM_S : Use of L_tmpnam_s

Summary

A use of the L_tmpnam_s preprocessor macro.

Properties

Class Name Use of L_tmpnam_s
Significance style
Mnemonic BADMACRO.L_TMPNAM_S
Categories
MisraC2023 MisraC2023:1.4 Emergent language features shall not be used
Misra2012 Misra2012:1.4 Emergent language features shall not be used
Availability Available for C and C++.
Enabling Checks for this warning class are disabled by default. To enable them, add the following WARNING_FILTER rule to the project configuration file.
WARNING_FILTER += allow class="Use of L_tmpnam_s"

Example

#include <stdio.h>

int f(int lentmp){
  if (lentmp < L_tmpnam_s){  /* 'Use of L_tmpnam_s' warning issued here */
        return lentmp;
    }
    return -1;
}

Relevant Configuration File Parameters

This class is implemented using a BAD_MACRO_* rule set in the general template configuration file.

The following configuration file parameters affect checks for this warning class.