Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/experimental/jax_fingerprint/ja4h/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MockDatasource : public Datasource

private:
std::string _method;
int _version;
int _version{};
std::map<std::string, std::string> _fields{};
};

Expand Down
15 changes: 3 additions & 12 deletions src/iocore/cache/unit_tests/test_RWW.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,20 +240,11 @@ class CacheRWWErrorTest : public CacheRWWTest
this->_read_event = this_ethread()->schedule_imm(this->_rt);
}
return;
} else {
this->close_write(100);
return;
}

// write at least one fragment before read it
if (this->_latest_fragments == this->_wt->vc->fragment) {
base->reenable();
return;
}

this->_latest_fragments = this->_wt->vc->fragment;
this->_rt->reenable();
break;
// Once the reader has started, abort the writer to exercise the error path.
this->close_write(100);
return;

case VC_EVENT_WRITE_COMPLETE:
REQUIRE(!"should not happen because the writer aborted");
Expand Down
2 changes: 2 additions & 0 deletions src/proxy/hdrs/unit_tests/test_Hdrs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,8 @@ TEST_CASE("HdrTest", "[proxy][hdrtest]")
if (cc_field == nullptr) {
std::printf("FAILED: missing Cache-Control header\n\n");
REQUIRE(false);
return; // REQUIRE throws, but make the early exit explicit so the dereferences below are
// unreachable to a reader and to the compiler
}

// TODO: Do we need to check the "count" returned?
Expand Down
2 changes: 1 addition & 1 deletion src/proxy/http/HttpCacheSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ HttpCacheSM::open_write(const HttpCacheKey *key, URL *url, HTTPHdr *request, Cac
CacheHTTPInfo *info = allow_multiple ? reinterpret_cast<CacheHTTPInfo *>(CACHE_ALLOW_MULTIPLE_WRITES) : old_info;
Action *action_handle = nullptr;

if (master_sm && master_sm->t_state.cache_info.volume_host_rec) {
if (master_sm->t_state.cache_info.volume_host_rec) {
action_handle =
cacheProcessor.open_write(this, key, info, pin_in_cache, CACHE_FRAG_TYPE_HTTP, master_sm->t_state.cache_info.volume_host_rec);
} else {
Expand Down
18 changes: 6 additions & 12 deletions src/proxy/http/remap/RemapYamlConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,8 @@ remap_validate_yaml_filter_args(acl_filter_rule **rule_pp, const YAML::Node &nod
return {};
}
}
if (ipi) {
rule->src_ip_cnt++;
rule->src_ip_valid = 1;
}
rule->src_ip_cnt++;
rule->src_ip_valid = 1;
return {};
};

Expand Down Expand Up @@ -239,10 +237,8 @@ remap_validate_yaml_filter_args(acl_filter_rule **rule_pp, const YAML::Node &nod
return {};
}
}
if (ipi) {
rule->src_ip_category_cnt++;
rule->src_ip_category_valid = 1;
}
rule->src_ip_category_cnt++;
rule->src_ip_category_valid = 1;
return {};
};

Expand Down Expand Up @@ -284,10 +280,8 @@ remap_validate_yaml_filter_args(acl_filter_rule **rule_pp, const YAML::Node &nod
return {};
}
}
if (ipi) {
rule->in_ip_cnt++;
rule->in_ip_valid = 1;
}
rule->in_ip_cnt++;
rule->in_ip_valid = 1;
return {};
};

Expand Down