You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "maskit (via GitHub)" <gi...@apache.org> on 2026/05/12 22:27:17 UTC
[PR] Fix build with newer Apple clang [trafficserver]
maskit opened a new pull request, #13157:
URL: https://github.com/apache/trafficserver/pull/13157
Four issues from newer Apple clang (version 21):
1. TextView.h: -Wdeprecated-literal-operator flags the whitespace between `""` and the suffix identifier in user-defined literal operator declarations. Remove the space in `operator"" _tv` and `operator"" _sv`.
2. configure.ac: the version check added in PR #12834 only applied -Wno-cast-function-type-mismatch when Apple clang was exactly version 17, so the flag was silently skipped on 21+. Extend the check to match version >= 17.
3. CryptoHash.h: memset/memcpy on non-trivially-copyable union type trip -Wnontrivial-memcall. Cast `this` to `void *`.
4. HostStatus.cc: same issue with bzero on HostStatRec.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix build with newer Apple clang [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit merged PR #13157:
URL: https://github.com/apache/trafficserver/pull/13157
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix build with newer Apple clang [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #13157:
URL: https://github.com/apache/trafficserver/pull/13157#issuecomment-4444479061
One thought / comment (not sure what we did for master), and likely for @bneradt :
Does the changes to TextView also need to go into the libswoc code repository ?
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix build with newer Apple clang [trafficserver]
Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on PR #13157:
URL: https://github.com/apache/trafficserver/pull/13157#issuecomment-4443048827
[approve ci autest 2]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix build with newer Apple clang [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #13157:
URL: https://github.com/apache/trafficserver/pull/13157#discussion_r3236848887
##########
include/tscore/CryptoHash.h:
##########
@@ -44,7 +44,7 @@ union CryptoHash {
uint8_t u8[CRYPTO_HASH_SIZE / sizeof(uint8_t)];
/// Default constructor - init to zero.
- CryptoHash() { memset(this, 0, sizeof(*this)); }
+ CryptoHash() { memset(static_cast<void *>(this), 0, sizeof(*this)); }
Review Comment:
Claude had an interesting thought on this, not for now, but for future. Maybe he's right, and we could simplify this "core" class.
```
The warning symptom is that a user-defined default constructor and
user-defined copy-assignment make the union non-trivially-copyable even
though every member is a `uint*_t` array. A cleaner long-term fix
(master only — not for 9.2.x) would be to initialize `u64{}` in-class
and default `operator=`, making the union genuinely trivially copyable
and retiring the memset/memcpy entirely. Filing a follow-up on master is
the right venue for that — this PR is the correct minimum for the
release branch.
```
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org