bryancall opened a new pull request, #13551: URL: https://github.com/apache/trafficserver/pull/13551
Part 2 of 3 splitting a Coverity Scan cleanup into independently reviewable pieces. Net **-13 lines**; every removal is provably unreachable, so there is no behavior change. ### Removals - **YAML remap filters** (`RemapYamlConfig.cc`, three lambdas): each tested `if (ipi)` where `ipi` is `&rule->src_ip_array[rule->src_ip_cnt]`, the address of an array element, which is never null. The surrounding `>= ACL_FILTER_MAX_*` bound check already returns before the address is taken, so there is no out-of-range address either. - **`HttpCacheSM::open_write`**: tested `master_sm &&` after `master_sm->redirection_tries` had already been dereferenced nine lines earlier in the same function. Every other method in the file dereferences it unguarded. Whether `master_sm` can be null at all is a separate question worth its own look; the identical guard at `open_read` is left in place. - **`test_RWW.cc`**: a block sitting after an `if`/`else` where both arms returned unconditionally. The flattened form is byte-for-byte equivalent in control flow, and the assertions that validate the writer abort are untouched. ### Two additions rather than removals - An explicit `return` after a Catch2 `REQUIRE(false)` in `test_Hdrs.cc`. `REQUIRE` throws, so this is unreachable at runtime; it makes the exit visible to the compiler and to a reader. - An explicit initializer on a test member that is assigned before every read today. Both are there to remove a construct static analysis cannot see through. Happy to drop either if you would rather not carry analyzer-appeasement in the tree. ### Verification Clean build with no new warnings and the full unit test suite passing (134/134) on Fedora, GCC 16.1.1. Draft while CI runs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
