Skip to content

[fix](be) Fix unused constant/function build errors in md5.cpp #63608

Open
zwy991114 wants to merge 1 commit into
apache:masterfrom
zwy991114:fix_be_build
Open

[fix](be) Fix unused constant/function build errors in md5.cpp #63608
zwy991114 wants to merge 1 commit into
apache:masterfrom
zwy991114:fix_be_build

Conversation

@zwy991114
Copy link
Copy Markdown

@zwy991114 zwy991114 commented May 25, 2026

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #63484

Problem Summary:

The constants MD5_A0/B0/C0/D0 and the helper functions md5_num_blocks / md5_pad_final_blocks in be/src/util/md5.cpp are only referenced inside the #ifdef __AVX2__ multi-buffer code path. On builds without AVX2 support, the compiler reports -Wunused-const-variable and -Wunused-function, which are promoted to errors via -Werror and break the build.

Move these AVX2-only declarations under the same #ifdef __AVX2__ guard that protects their sole consumer. MD5_DUMMY_INPUT and md5_to_hex remain outside the guard since both code paths use them.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@zwy991114
Copy link
Copy Markdown
Author

/review

@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants