From 927a6e47948e9c18f0084b5ea0426955d07a6ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 9 Dec 2012 09:35:57 +0100 Subject: [PATCH] Obsolete functions: removed 'ctime' warning. The function is obsolete but the message don't point out a good replacement nor where it's documented that this function is obsolete --- lib/checkobsoletefunctions.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/checkobsoletefunctions.h b/lib/checkobsoletefunctions.h index 764e47d81..e46fb2267 100644 --- a/lib/checkobsoletefunctions.h +++ b/lib/checkobsoletefunctions.h @@ -118,7 +118,8 @@ private: _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."; + // ctime is obsolete - it's not threadsafe. but there is no good replacement. + //_obsoleteC99Functions["ctime"] = "Obsolete function 'ctime' called. It is recommended to use the function 'strftime' instead."; } void getErrorMessages(ErrorLogger *errorLogger, const Settings *settings) const {