Skip to content

Commit e84ca70

Browse files
authored
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 355a9ee.
1 parent c183dd1 commit e84ca70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/proxy/http/HttpUserAgent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ HttpUserAgent::set_txn(ProxyTransaction *txn, TransactionMilestones &milestones)
178178
if (auto group{tbs->get_tls_group()}; !group.empty()) {
179179
m_conn_info.security_group = group;
180180
} else {
181-
m_conn_info.security_group = "-";
181+
m_conn_info.security_group = '-';
182182
}
183183

184184
if (!m_conn_info.tcp_reused) {

0 commit comments

Comments
 (0)