Skip to content

clang/lib/Lex/PPMacroExpansion.cpp: 2 * calls to obsolete function asctime #98724

@dcb314

Description

@dcb314

Static analyser cppcheck says:

trunk/clang/lib/Lex/PPMacroExpansion.cpp:1728:16: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [asctimeCalled]

Source code is

 Result = asctime(TM);

trunk/clang/lib/Lex/PPMacroExpansion.cpp:1738:18: style: Obsolete function 'asctime' called. It is recommended to use 'strftime' instead. [asctimeCalled]

Source code is

  Result = asctime(TM);

But "man asctime" says:

Marked obsolete in POSIX.1-2008 (recommending strftime(3)).

2008 is 16 years ago.

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"code-qualityconfirmedVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contribute

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions