From a61fae381169b4d0ca016e4fa1905c22059ec440 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 12 Dec 2024 09:16:06 +0100 Subject: [PATCH] cwe-mapper: suppres a false positive of Coverity ``` Error: PASS_BY_VALUE (CWE-398): src/lib/cwe-mapper.cc:38:45: pass_by_value: Passing parameter def of type "Defect" (size 200 bytes) by value, which exceeds the low threshold of 128 bytes. ``` Closes: https://github.com/csutils/csdiff/pull/216 --- src/lib/cwe-mapper.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/cwe-mapper.cc b/src/lib/cwe-mapper.cc index 32e7d097..f80dff75 100644 --- a/src/lib/cwe-mapper.cc +++ b/src/lib/cwe-mapper.cc @@ -35,6 +35,7 @@ struct CweMap::Private { bool detectedByTool(Defect def, const char *tool) const; }; +// coverity[pass_by_value] bool CweMap::Private::detectedByTool(Defect def, const char *tool) const { // detect tool in case it is not explicitly specified