CheckObsoleteFunctions: asctime and ctime are not posix functions

This commit is contained in:
Daniel Marjamäki 2012-08-27 18:49:48 +02:00
parent 03f6a19dbd
commit a7e67ac379
1 changed files with 2 additions and 2 deletions

View File

@ -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 {