This is an automated email from the ASF dual-hosted git repository. bcall pushed a commit to branch fix-fedora41-uri-signing-nonnull in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 924800b6fd825ddc8697146c3d2a97fd50e12b5e Author: Bryan Call <[email protected]> AuthorDate: Fri Oct 24 10:52:53 2025 -0700 Fix nonnull warning in uri_signing unit tests Add nullptr check before strcmp to satisfy GCC's -Werror=nonnull warning. The expected_strip parameter can be nullptr in some test cases, so we need to check for null before passing to strcmp. This fixes the Fedora 41 gcc release build failure. --- plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc b/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc index fdfca52cd2..4425756ce2 100644 --- a/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc +++ b/plugins/experimental/uri_signing/unit_tests/uri_signing_test.cc @@ -225,7 +225,7 @@ jws_parsing_helper(const char *uri, const char *paramName, const char *expected_ cjose_jws_t *jws = get_jws_from_uri(uri, uri_ct, paramName, uri_strip, uri_ct, &strip_ct); if (jws) { resp = true; - if (strcmp(uri_strip, expected_strip) != 0) { + if (expected_strip != nullptr && strcmp(uri_strip, expected_strip) != 0) { cjose_jws_release(jws); resp = false; }
