aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/sm-malloc.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2022-07-28 17:21:29 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2022-07-28 17:21:29 -0400
commit9c60338061bf3679f925be12273dc723b3913b75 (patch)
treed3ad928adea5efbf335fa449d1bbe6ef37f85f3b /gcc/analyzer/sm-malloc.cc
parent9cac6811cf0d6c1437426aaf13ea52c16c16fc80 (diff)
downloadgcc-9c60338061bf3679f925be12273dc723b3913b75.zip
gcc-9c60338061bf3679f925be12273dc723b3913b75.tar.gz
gcc-9c60338061bf3679f925be12273dc723b3913b75.tar.bz2
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 <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/sm-malloc.cc')
-rw-r--r--gcc/analyzer/sm-malloc.cc1
1 files changed, 1 insertions, 0 deletions
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)