This is an automated email from the ASF dual-hosted git repository.
bcall 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 e84ca70ed0 Fix false positive -Wrestrict warning in HttpUserAgent.h
with GCC 12 (#12715)
e84ca70ed0 is described below
commit e84ca70ed0a1f2a80198b6ca6d65c84bb8b2da68
Author: Bryan Call <[email protected]>
AuthorDate: Tue Dec 2 14:02:58 2025 -0800
Fix false positive -Wrestrict warning in HttpUserAgent.h with GCC 12
(#12715)
GCC 12 produces a false positive -Wrestrict warning when assigning the
string literal "-" to std::string in HttpUserAgent::set_txn(). Change
to use char literal '-' instead of string literal "-" to avoid the
warning, similar to commit 355a9ee34d.
---
include/proxy/http/HttpUserAgent.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/proxy/http/HttpUserAgent.h
b/include/proxy/http/HttpUserAgent.h
index 14520ff5b9..4761e4a30e 100644
--- a/include/proxy/http/HttpUserAgent.h
+++ b/include/proxy/http/HttpUserAgent.h
@@ -178,7 +178,7 @@ HttpUserAgent::set_txn(ProxyTransaction *txn,
TransactionMilestones &milestones)
if (auto group{tbs->get_tls_group()}; !group.empty()) {
m_conn_info.security_group = group;
} else {
- m_conn_info.security_group = "-";
+ m_conn_info.security_group = '-';
}
if (!m_conn_info.tcp_reused) {