Suppress sanitizer warning (#572)
Add default initializer for HttpConstraint::method_ member variable to avoid the following warning given by gcc's undefined behavior sanitizer (-fsanitize=undefined): drogon/lib/inc/drogon/utils/HttpConstraint.h:30:7: runtime error: load of value 32767, which is not a valid value for type 'HttpMethod'
This commit is contained in:
parent
a32170b9a3
commit
6f7a062221
|
@ -57,7 +57,7 @@ class HttpConstraint
|
|||
|
||||
private:
|
||||
ConstraintType type_{ConstraintType::None};
|
||||
HttpMethod method_;
|
||||
HttpMethod method_{HttpMethod::Invalid};
|
||||
std::string filterName_;
|
||||
};
|
||||
} // namespace internal
|
||||
|
|
Loading…
Reference in New Issue