CheckObsoleteFunctions: asctime and ctime are not posix functions
This commit is contained in:
parent
03f6a19dbd
commit
a7e67ac379
|
@ -86,9 +86,7 @@ private:
|
|||
{"wcswcs", "wcsstr"},
|
||||
{"rand_r", "rand"},
|
||||
{"utime", "utimensat"},
|
||||
{"asctime", "strftime"},
|
||||
{"asctime_r", "strftime"},
|
||||
{"ctime", "strftime"},
|
||||
{"ctime_r", "strftime"}
|
||||
};
|
||||
|
||||
|
@ -119,6 +117,8 @@ private:
|
|||
"The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun if the input data exceeds the size of the buffer. It is recommended to use the function 'fgets' instead.";
|
||||
_obsoleteC99Functions["alloca"] = "Obsolete function 'alloca' called. In C99 and later it is recommended to use a variable length array instead.\n"
|
||||
"The obsolete function 'alloca' is called. In C99 and later it is recommended to use a variable length array or a dynamically allocated array instead. The function 'alloca' is dangerous for many reasons (http://stackoverflow.com/questions/1018853/why-is-alloca-not-considered-good-practice and http://linux.die.net/man/3/alloca).";
|
||||
_obsoleteC99Functions["asctime"] = "Obsolete function 'asctime' called. It is recommended to use the function 'strftime' instead.";
|
||||
_obsoleteC99Functions["ctime"] = "Obsolete function 'ctime' called. It is recommended to use the function 'strftime' instead.";
|
||||
}
|
||||
|
||||
void getErrorMessages(ErrorLogger *errorLogger, const Settings *settings) const {
|
||||
|
|
Loading…
Reference in New Issue