airborne12 opened a new pull request, #63723:
URL: https://github.com/apache/doris/pull/63723
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
The constants `MD5_A0`/`MD5_B0`/`MD5_C0`/`MD5_D0` and the helpers
`md5_num_blocks()` and `md5_pad_final_blocks()` in `be/src/util/md5.cpp` are
only referenced by the AVX2 multi-buffer code path (`md5_multi_buffer_compute`
/ `md5_binary_batch_avx2`). On non-AVX2 builds (e.g. macOS ARM64) the AVX2
block is `#ifdef`'d out, leaving these symbols orphaned and triggering compile
errors under the project's strict warnings:
```
error: unused variable 'MD5_A0' [-Werror,-Wunused-const-variable]
error: unused variable 'MD5_B0' [-Werror,-Wunused-const-variable]
error: unused variable 'MD5_C0' [-Werror,-Wunused-const-variable]
error: unused variable 'MD5_D0' [-Werror,-Wunused-const-variable]
error: unused function 'md5_pad_final_blocks' [-Werror,-Wunused-function]
```
This PR moves those AVX2-only constants and helpers inside the existing
`#ifdef __AVX2__` block where they belong. `MD5_DUMMY_INPUT` and `md5_to_hex`
stay outside the guard because the non-AVX2 fallback in `md5_hex_batch` still
uses them. No behavior change on x86_64; restores build on ARM/non-AVX2 targets.
### Release note
None
### Check List (For Author)
- Test
- [x] No need to test or manual test. Explain why:
- [x] This is a refactor/code format and no logic has been changed.
- [x] Previous test can cover this change.
Manual test: verified `./build.sh --be -j 20` now succeeds on macOS ARM64.
- Behavior changed:
- [x] No.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]