mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Address cppcheck warnings generated after addressing Sonarcloud suggestions
- The following two warnings were generated after introducing the change to instantiate the DigestImpl template with the address of mbedtls_md5 or mbedtls_sha1: - warning: src/utils/sha1.h,62,error,danglingTemporaryLifetime,Using pointer that is a temporary. - warning: src/utils/sha1.h,60,style,constVariablePointer,Variable 'ret' can be declared as pointer to const - See https://github.com/owasp-modsecurity/ModSecurity/pull/3231#issuecomment-2312511500
This commit is contained in:
parent
bbef22b3b5
commit
2fb446ab2d
@ -57,7 +57,7 @@ private:
|
|||||||
ConvertOp convertOp) -> auto {
|
ConvertOp convertOp) -> auto {
|
||||||
char digest[DigestSize];
|
char digest[DigestSize];
|
||||||
|
|
||||||
auto ret = digestOp(reinterpret_cast<const unsigned char *>(input.c_str()),
|
const auto ret = (*digestOp)(reinterpret_cast<const unsigned char *>(input.c_str()),
|
||||||
input.size(), reinterpret_cast<unsigned char *>(digest));
|
input.size(), reinterpret_cast<unsigned char *>(digest));
|
||||||
assert(ret == 0);
|
assert(ret == 0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user