From 9c60338061bf3679f925be12273dc723b3913b75 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 28 Jul 2022 17:21:29 -0400 Subject: analyzer: add CWE identifier URLs to docs gcc/analyzer/ChangeLog: * sm-malloc.cc (free_of_non_heap::emit): Add comment about CWE. * sm-taint.cc (tainted_size::emit): Likewise. gcc/ChangeLog: * doc/invoke.texi (-fdiagnostics-show-cwe): Use uref rather than url. (Static Analyzer Options): Likewise. Add urefs for all of the warnings that have associated CWE identifiers. Signed-off-by: David Malcolm --- gcc/analyzer/sm-malloc.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/analyzer/sm-malloc.cc') diff --git a/gcc/analyzer/sm-malloc.cc b/gcc/analyzer/sm-malloc.cc index 608aceb..73c549f 100644 --- a/gcc/analyzer/sm-malloc.cc +++ b/gcc/analyzer/sm-malloc.cc @@ -1300,6 +1300,7 @@ public: bool emit (rich_location *rich_loc) final override { + /* "CWE-401: Missing Release of Memory after Effective Lifetime". */ diagnostic_metadata m; m.add_cwe (401); if (m_arg) -- cgit v1.1