This is an automated email from the ASF dual-hosted git repository.
dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 9e75d95575 Coverity: Trying to fix some of the following CID issues.
(#11112)
9e75d95575 is described below
commit 9e75d955752cf29e7189a47aab894179b3bc218f
Author: Damian Meden <[email protected]>
AuthorDate: Tue Apr 16 18:17:49 2024 +0200
Coverity: Trying to fix some of the following CID issues. (#11112)
1534738
1534732
1534699
1534727
1534717
---
plugins/experimental/txn_box/plugin/src/Ex_Base.cc | 2 +-
plugins/experimental/txn_box/plugin/src/Ex_HTTP.cc | 10 +++++-----
plugins/experimental/txn_box/plugin/src/Modifier.cc | 2 +-
plugins/experimental/txn_box/plugin/src/text_block.cc | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/plugins/experimental/txn_box/plugin/src/Ex_Base.cc
b/plugins/experimental/txn_box/plugin/src/Ex_Base.cc
index 8e12965066..d8344444c7 100644
--- a/plugins/experimental/txn_box/plugin/src/Ex_Base.cc
+++ b/plugins/experimental/txn_box/plugin/src/Ex_Base.cc
@@ -299,7 +299,7 @@ Ex_txn_conf::validate(Config &cfg, Spec &spec, const
TextView &arg)
Feature
Ex_txn_conf::extract(Context &ctx, const Extractor::Spec &spec)
{
- Feature zret;
+ Feature zret{};
auto var = spec._data.span.rebind<store_type>()[0];
auto &&[value, errata] = ctx._txn.override_fetch(*var);
if (errata.is_ok()) {
diff --git a/plugins/experimental/txn_box/plugin/src/Ex_HTTP.cc
b/plugins/experimental/txn_box/plugin/src/Ex_HTTP.cc
index 94b3bd6e70..0835dda9d5 100644
--- a/plugins/experimental/txn_box/plugin/src/Ex_HTTP.cc
+++ b/plugins/experimental/txn_box/plugin/src/Ex_HTTP.cc
@@ -557,7 +557,7 @@ Ex_ua_req_port::validate(Config &, Spec &, const
swoc::TextView &)
Feature
Ex_ua_req_port::extract(Context &ctx, Spec const &)
{
- Feature zret;
+ Feature zret{};
if (auto hdr{ctx.ua_req_hdr()}; hdr.is_valid()) {
if (ts::URL url{hdr.url()}; url.is_valid()) {
zret = static_cast<feature_type_for<INTEGER>>(url.port());
@@ -585,7 +585,7 @@ Ex_proxy_req_port::validate(Config &, Spec &, const
swoc::TextView &)
Feature
Ex_proxy_req_port::extract(Context &ctx, Spec const &)
{
- Feature zret;
+ Feature zret{};
if (auto hdr{ctx.proxy_req_hdr()}; hdr.is_valid()) {
if (ts::URL url{hdr.url()}; url.is_valid()) {
zret = static_cast<feature_type_for<INTEGER>>(url.port());
@@ -1022,7 +1022,7 @@ Ex_pre_remap_port::validate(Config &, Spec &, const
swoc::TextView &)
Feature
Ex_pre_remap_port::extract(Context &ctx, Spec const &)
{
- Feature zret;
+ Feature zret{};
if (auto url{ctx._txn.pristine_url_get()}; url.is_valid()) {
zret = static_cast<feature_type_for<INTEGER>>(url.port());
}
@@ -1048,7 +1048,7 @@ Ex_remap_target_port::validate(Config &, Spec &, const
swoc::TextView &)
Feature
Ex_remap_target_port::extract(Context &ctx, Spec const &)
{
- Feature zret;
+ Feature zret{};
if (ctx._remap_info) {
if (ts::URL url{ctx._remap_info->requestBufp,
ctx._remap_info->mapFromUrl}; url.is_valid()) {
zret = static_cast<feature_type_for<INTEGER>>(url.port());
@@ -1077,7 +1077,7 @@ Ex_remap_replacement_port::validate(Config &, Spec &,
const swoc::TextView &)
Feature
Ex_remap_replacement_port::extract(Context &ctx, Spec const &)
{
- Feature zret;
+ Feature zret{};
if (ctx._remap_info) {
if (ts::URL url{ctx._remap_info->requestBufp, ctx._remap_info->mapToUrl};
url.is_valid()) {
zret = static_cast<feature_type_for<INTEGER>>(url.port());
diff --git a/plugins/experimental/txn_box/plugin/src/Modifier.cc
b/plugins/experimental/txn_box/plugin/src/Modifier.cc
index e48351cf3a..da6c26c38b 100644
--- a/plugins/experimental/txn_box/plugin/src/Modifier.cc
+++ b/plugins/experimental/txn_box/plugin/src/Modifier.cc
@@ -428,7 +428,7 @@ Mod_filter::compare(Context &ctx, Feature const &feature)
const -> Case const *
Rv<Feature>
Mod_filter::operator()(Context &ctx, Feature &feature)
{
- Feature zret;
+ Feature zret{};
if (feature.is_list()) {
auto src = std::get<IndexFor(TUPLE)>(feature);
auto farray = static_cast<Feature *>(alloca(sizeof(Feature) *
src.count()));
diff --git a/plugins/experimental/txn_box/plugin/src/text_block.cc
b/plugins/experimental/txn_box/plugin/src/text_block.cc
index a514c4701c..0fd296b8b2 100644
--- a/plugins/experimental/txn_box/plugin/src/text_block.cc
+++ b/plugins/experimental/txn_box/plugin/src/text_block.cc
@@ -480,7 +480,7 @@ Mod_as_text_block::load(Config &cfg, YAML::Node, TextView,
TextView, YAML::Node
Rv<Feature>
Mod_as_text_block::operator()(Context &ctx, Feature &feature)
{
- Feature zret;
+ Feature zret{};
if (IndexFor(STRING) == feature.index()) {
auto const &tag = std::get<IndexFor(STRING)>(feature); // get the name.
zret = Ex_text_block::extract_block(ctx, tag);